Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from convert import convert
|
|
|
4 |
|
5 |
|
6 |
def run(token: str, model_id: str) -> str:
|
@@ -13,7 +14,8 @@ def run(token: str, model_id: str) -> str:
|
|
13 |
try:
|
14 |
# TODO(Run this in a separate directory otherwise max_concurrency = 1...)
|
15 |
# as filename of conversion is fixed.
|
16 |
-
|
|
|
17 |
return f"""
|
18 |
### Success 🔥
|
19 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from convert import convert
|
4 |
+
from huggingface_hub import HfApi
|
5 |
|
6 |
|
7 |
def run(token: str, model_id: str) -> str:
|
|
|
14 |
try:
|
15 |
# TODO(Run this in a separate directory otherwise max_concurrency = 1...)
|
16 |
# as filename of conversion is fixed.
|
17 |
+
api = HfApi(token=token)
|
18 |
+
commit_info = convert(api=api, model_id=model_id)
|
19 |
return f"""
|
20 |
### Success 🔥
|
21 |
|