davanstrien HF staff commited on
Commit
0741973
β€’
1 Parent(s): 32c6187

formatting

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -1,11 +1,10 @@
1
- import gradio as gr
2
- from gradio_client import Client
3
  import json
4
- from cachetools import cached, TTLCache
5
- from typing import Optional, Any, List, Union, Dict
 
6
  import httpx
7
- import requests
8
- from typing import Dict, Any
9
  from toolz import groupby
10
 
11
  CACHE_TIME = 60 * 60 * 1 # 1 hour
@@ -115,7 +114,9 @@ def _get_recommendations_from_slug(
115
  if not ids:
116
  return (
117
  "Based on your collection and exclusions"
118
- f" ({','.join(excluded_repo_types)}), there are no papers to recommend. Try removing some excluded repo types or adding more items to your collection."
 
 
119
  )
120
  ids = tuple(ids)
121
  recommendations = get_recommendations_from_semantic_scholar(ids)
@@ -153,7 +154,7 @@ slug_input = gr.Textbox(
153
  example_slugs = [
154
  ["merve/video-classification-models-6509edd0a6f657faa425e8c3", []],
155
  ["osanseviero/model-merging-65097893623330a3a51ead66", []],
156
- ["hf4h/clinical-language-models-64f9c1cd0cedc04f3caca264",[]]
157
  ]
158
 
159
  gr.Interface(
 
 
 
1
  import json
2
+ from typing import Any, Dict, List, Optional, Union
3
+
4
+ import gradio as gr
5
  import httpx
6
+ from cachetools import TTLCache, cached
7
+ from gradio_client import Client
8
  from toolz import groupby
9
 
10
  CACHE_TIME = 60 * 60 * 1 # 1 hour
 
114
  if not ids:
115
  return (
116
  "Based on your collection and exclusions"
117
+ f" ({','.join(excluded_repo_types)}), there are no papers to recommend. Try"
118
+ " removing some excluded repo types or adding more items to your"
119
+ " collection."
120
  )
121
  ids = tuple(ids)
122
  recommendations = get_recommendations_from_semantic_scholar(ids)
 
154
  example_slugs = [
155
  ["merve/video-classification-models-6509edd0a6f657faa425e8c3", []],
156
  ["osanseviero/model-merging-65097893623330a3a51ead66", []],
157
+ ["hf4h/clinical-language-models-64f9c1cd0cedc04f3caca264", []],
158
  ]
159
 
160
  gr.Interface(