Spaces:
Running
Running
github-actions[bot]
commited on
Commit
·
c4ad401
1
Parent(s):
0682cc6
Auto-sync from demo at Wed Sep 10 11:02:39 UTC 2025
Browse files- app.py +3 -1
- webui/app.py +3 -1
app.py
CHANGED
@@ -2,6 +2,7 @@ import json
|
|
2 |
import os
|
3 |
import sys
|
4 |
import tempfile
|
|
|
5 |
|
6 |
import gradio as gr
|
7 |
import pandas as pd
|
@@ -15,7 +16,8 @@ from webui.i18n import gettext as _
|
|
15 |
from webui.test_api import test_api_connection
|
16 |
|
17 |
# pylint: disable=wrong-import-position
|
18 |
-
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
19 |
sys.path.append(root_dir)
|
20 |
|
21 |
from graphgen.graphgen import GraphGen
|
|
|
2 |
import os
|
3 |
import sys
|
4 |
import tempfile
|
5 |
+
from importlib.resources import files
|
6 |
|
7 |
import gradio as gr
|
8 |
import pandas as pd
|
|
|
16 |
from webui.test_api import test_api_connection
|
17 |
|
18 |
# pylint: disable=wrong-import-position
|
19 |
+
# root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
20 |
+
root_dir = files("webui").parent
|
21 |
sys.path.append(root_dir)
|
22 |
|
23 |
from graphgen.graphgen import GraphGen
|
webui/app.py
CHANGED
@@ -2,6 +2,7 @@ import json
|
|
2 |
import os
|
3 |
import sys
|
4 |
import tempfile
|
|
|
5 |
|
6 |
import gradio as gr
|
7 |
import pandas as pd
|
@@ -15,7 +16,8 @@ from webui.i18n import gettext as _
|
|
15 |
from webui.test_api import test_api_connection
|
16 |
|
17 |
# pylint: disable=wrong-import-position
|
18 |
-
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
19 |
sys.path.append(root_dir)
|
20 |
|
21 |
from graphgen.graphgen import GraphGen
|
|
|
2 |
import os
|
3 |
import sys
|
4 |
import tempfile
|
5 |
+
from importlib.resources import files
|
6 |
|
7 |
import gradio as gr
|
8 |
import pandas as pd
|
|
|
16 |
from webui.test_api import test_api_connection
|
17 |
|
18 |
# pylint: disable=wrong-import-position
|
19 |
+
# root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
20 |
+
root_dir = files("webui").parent
|
21 |
sys.path.append(root_dir)
|
22 |
|
23 |
from graphgen.graphgen import GraphGen
|