Spaces:
Runtime error
Runtime error
Commit
β’
0741973
1
Parent(s):
32c6187
formatting
Browse files
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from gradio_client import Client
|
3 |
import json
|
4 |
-
from
|
5 |
-
|
|
|
6 |
import httpx
|
7 |
-
import
|
8 |
-
from
|
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
|
|
|
|
|
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(
|