Spaces:
Runtime error
Runtime error
Commit
•
b58be1d
1
Parent(s):
63c889a
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ command = f"pip install git+https://x-access-token:{token}:x-oauth-basic@github.
|
|
10 |
subprocess.run(command, shell=True, check=True)
|
11 |
#### INSTALL LIB
|
12 |
|
|
|
13 |
import json
|
14 |
import gradio as gr
|
15 |
from recommender.main import get_tgi_config
|
@@ -22,7 +23,7 @@ def greet(model_id, gpu_memory, num_gpus):
|
|
22 |
return json.dumps({"error": str(e)})
|
23 |
if configs is None:
|
24 |
return json.dumps({"error": f"Couldn't generate TGI config for {model_id}"})
|
25 |
-
return json.dumps(configs)
|
26 |
|
27 |
|
28 |
theme = gr.themes.Monochrome(
|
|
|
10 |
subprocess.run(command, shell=True, check=True)
|
11 |
#### INSTALL LIB
|
12 |
|
13 |
+
from dataclasses import asdict
|
14 |
import json
|
15 |
import gradio as gr
|
16 |
from recommender.main import get_tgi_config
|
|
|
23 |
return json.dumps({"error": str(e)})
|
24 |
if configs is None:
|
25 |
return json.dumps({"error": f"Couldn't generate TGI config for {model_id}"})
|
26 |
+
return json.dumps(asdict(configs))
|
27 |
|
28 |
|
29 |
theme = gr.themes.Monochrome(
|