merve HF staff commited on
Commit
94f76c3
Β·
1 Parent(s): f676f21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -13
app.py CHANGED
@@ -166,21 +166,19 @@ def space_card(space):
166
 
167
  def category_tab(category):
168
  with gr.Tab(label=category.title, elem_id="news-tab"):
169
- with gr.Row():
170
- with gr.Column():
171
- gr.Markdown(category.description, elem_id="margin-top")
172
- with gr.Column():
173
- gr.Markdown("### Hugging Face News πŸ“°")
174
- [news_card(x) for x in category.news]
175
  # with gr.Tab(label="Hugging Face Projects"):
176
  # gr.Markdown("....")
177
- with gr.Tab(label="Spaces"):
178
- with gr.Row(elem_id="spaces-flex"):
179
- [space_card(x) for x in category.spaces]
180
- with gr.Tab(label="Models - Coming Soon!"):
181
- gr.Markdown(elem_id="margin-top", value="#### Check back soon for featured models πŸ€—")
182
- with gr.Tab(label="Datasets - Coming Soon!"):
183
- gr.Markdown(elem_id="margin-top", value="#### Check back soon for featured datasets πŸ€—")
184
 
185
 
186
  with gr.Blocks(css="#margin-top {margin-top: 15px} #center {text-align: center;} #news-tab {padding: 15px;} #news-tab h3 {margin: 0px; text-align: center;} #news-tab p {margin: 0px;} #article-button {flex-grow: initial;} #news-row {align-items: center;} #spaces-flex {flex-wrap: wrap; justify-content: space-around;} #space-card { display: flex; min-width: calc(90% / 3); max-width:calc(100% / 3); box-sizing: border-box;} #event-tabs {margin-top: 0px;} #spaces-flex > #paper-tile {min-width: 30%; max-width: 30%;}") as demo:
 
166
 
167
  def category_tab(category):
168
  with gr.Tab(label=category.title, elem_id="news-tab"):
169
+ with gr.Column():
170
+ gr.Markdown(category.description, elem_id="margin-top")
171
+ with gr.Column():
172
+ [news_card(x) for x in category.news]
 
 
173
  # with gr.Tab(label="Hugging Face Projects"):
174
  # gr.Markdown("....")
175
+ #with gr.Tab(label="Spaces"):
176
+ # with gr.Row(elem_id="spaces-flex"):
177
+ # [space_card(x) for x in category.spaces]
178
+ # with gr.Tab(label="Models - Coming Soon!"):
179
+ # gr.Markdown(elem_id="margin-top", value="#### Check back soon for featured models πŸ€—")
180
+ # with gr.Tab(label="Datasets - Coming Soon!"):
181
+ # gr.Markdown(elem_id="margin-top", value="#### Check back soon for featured datasets πŸ€—")
182
 
183
 
184
  with gr.Blocks(css="#margin-top {margin-top: 15px} #center {text-align: center;} #news-tab {padding: 15px;} #news-tab h3 {margin: 0px; text-align: center;} #news-tab p {margin: 0px;} #article-button {flex-grow: initial;} #news-row {align-items: center;} #spaces-flex {flex-wrap: wrap; justify-content: space-around;} #space-card { display: flex; min-width: calc(90% / 3); max-width:calc(100% / 3); box-sizing: border-box;} #event-tabs {margin-top: 0px;} #spaces-flex > #paper-tile {min-width: 30%; max-width: 30%;}") as demo: