Spaces:
Runtime error
Runtime error
Commit
·
d01071c
1
Parent(s):
9131367
try to build from source
Browse files
app.py
CHANGED
|
@@ -1,8 +1,22 @@
|
|
| 1 |
|
| 2 |
# https://discuss.huggingface.co/t/how-to-install-a-specific-version-of-gradio-in-spaces/13552
|
| 3 |
import os
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
import gradio as gr
|
| 8 |
from cmo_db_inspector import App
|
|
|
|
| 1 |
|
| 2 |
# https://discuss.huggingface.co/t/how-to-install-a-specific-version-of-gradio-in-spaces/13552
|
| 3 |
import os
|
| 4 |
+
|
| 5 |
+
def p(command):
|
| 6 |
+
print("EXEC: " + command)
|
| 7 |
+
os.system(command)
|
| 8 |
+
|
| 9 |
+
p("wget -qO- https://get.pnpm.io/install.sh | sh -")
|
| 10 |
+
p("git clone https://github.com/yiyuezhuo/gradio --branch cmo_pinned")
|
| 11 |
+
os.chdir("gradio")
|
| 12 |
+
p("pnpm i --frozen-lockfile")
|
| 13 |
+
p("pnpm build")
|
| 14 |
+
p("pip uninstall -y gradio")
|
| 15 |
+
p("pip install -e .")
|
| 16 |
+
os.chdir("..")
|
| 17 |
+
|
| 18 |
+
# os.system("pip uninstall -y gradio")
|
| 19 |
+
# os.system("pip install git+https://github.com/yiyuezhuo/gradio@cmo_pinned")
|
| 20 |
|
| 21 |
import gradio as gr
|
| 22 |
from cmo_db_inspector import App
|