Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,8 @@ from huggingface_hub import HfApi, ModelFilter, list_models
|
|
| 4 |
api = HfApi()
|
| 5 |
def model_explorer(search,limit=100,task='text-generation'):
|
| 6 |
# List all models
|
|
|
|
|
|
|
| 7 |
if not search:
|
| 8 |
search=None
|
| 9 |
out_box=[]
|
|
@@ -84,7 +86,7 @@ def fix_json():
|
|
| 84 |
with gr.Blocks() as app:
|
| 85 |
with gr.Row():
|
| 86 |
search=gr.Textbox()
|
| 87 |
-
limit=gr.Slider(minimum=
|
| 88 |
btn=gr.Button()
|
| 89 |
models_json=gr.JSON()
|
| 90 |
btn.click(model_explorer,[search,limit],models_json)
|
|
|
|
| 4 |
api = HfApi()
|
| 5 |
def model_explorer(search,limit=100,task='text-generation'):
|
| 6 |
# List all models
|
| 7 |
+
if limit==0:
|
| 8 |
+
limit=None
|
| 9 |
if not search:
|
| 10 |
search=None
|
| 11 |
out_box=[]
|
|
|
|
| 86 |
with gr.Blocks() as app:
|
| 87 |
with gr.Row():
|
| 88 |
search=gr.Textbox()
|
| 89 |
+
limit=gr.Slider(minimum=0,maximum=10000,value=100)
|
| 90 |
btn=gr.Button()
|
| 91 |
models_json=gr.JSON()
|
| 92 |
btn.click(model_explorer,[search,limit],models_json)
|