File size: 1,208 Bytes
9131367
 
 
d01071c
 
 
 
 
96f4ac9
 
 
870e6ac
 
 
 
 
 
 
66bbbaf
 
a3896d3
870e6ac
 
 
d01071c
 
 
 
 
 
 
 
870e6ac
d01071c
 
 
9131367
bb198c7
eade255
 
a15cf40
96f4ac9
a15cf40
96f4ac9
 
bb198c7
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

# https://discuss.huggingface.co/t/how-to-install-a-specific-version-of-gradio-in-spaces/13552
import os

def p(command):
    print("EXEC: " + command)
    os.system(command)

p("mkdir _gradio")
p("mv gradio.zip _gradio")
os.chdir("_gradio")

from zipfile import ZipFile

z = ZipFile("gradio.zip")
z.extractall()
p("pip uninstall gradio")
p("pip install -e .")
print(os.getcwd())
import sys
sys.path.append(os.getcwd())
os.chdir("..")

"""
p("wget -qO- https://get.pnpm.io/install.sh | sh -")
p("git clone https://github.com/yiyuezhuo/gradio --branch cmo_pinned")
os.chdir("gradio")
p("pnpm i --frozen-lockfile")
p("pnpm build")
p("pip uninstall -y gradio")
p("pip install -e .")
os.chdir("..")
"""

# os.system("pip uninstall -y gradio")
# os.system("pip install git+https://github.com/yiyuezhuo/gradio@cmo_pinned")

import gradio as gr
import pandas as pd
import plotly
import sqlalchemy

print(f"gr.__version__={gr.__version__}, pd.__version__={pd.__version__}, ployly.__version__={plotly.__version__}, sqlalchemy.__version__={sqlalchemy.__version__}")
print(dir(gr))

from cmo_db_inspector import App
from pathlib import Path

cmo_db_root = Path("DB")

app = App(cmo_db_root).create()
app.demo.launch()