Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from huggingface_hub import HfApi, ModelFilter, list_models
|
| 3 |
api = HfApi()
|
| 4 |
def model_explorer():
|
|
@@ -12,4 +13,15 @@ def model_explorer():
|
|
| 12 |
print(mod.downloads)
|
| 13 |
print(mod.likes)
|
| 14 |
print(mod.pipeline_tag)
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import json
|
| 3 |
from huggingface_hub import HfApi, ModelFilter, list_models
|
| 4 |
api = HfApi()
|
| 5 |
def model_explorer():
|
|
|
|
| 13 |
print(mod.downloads)
|
| 14 |
print(mod.likes)
|
| 15 |
print(mod.pipeline_tag)
|
| 16 |
+
out = mod.id
|
| 17 |
+
return out
|
| 18 |
+
|
| 19 |
+
def tasks_json():
|
| 20 |
+
|
| 21 |
+
with open("tasks.json", "r") as read_file:
|
| 22 |
+
print("Read JSON file")
|
| 23 |
+
tasks = json.load(read_file)
|
| 24 |
+
|
| 25 |
+
print("Before Pretty Printing JSON Data")
|
| 26 |
+
print(tasks)
|
| 27 |
+
tasks_json()
|