Spaces:
Running
Running
chenzihong-gavin
commited on
Commit
·
e453a65
1
Parent(s):
acd7cf4
refactor: refact app.py
Browse files- webui/app.py → app.py +7 -7
webui/app.py → app.py
RENAMED
|
@@ -8,13 +8,13 @@ import gradio as gr
|
|
| 8 |
|
| 9 |
from gradio_i18n import Translate, gettext as _
|
| 10 |
|
| 11 |
-
from base import GraphGenParams
|
| 12 |
-
from test_api import test_api_connection
|
| 13 |
-
from cache_utils import setup_workspace, cleanup_workspace
|
| 14 |
-
from count_tokens import count_tokens
|
| 15 |
|
| 16 |
# pylint: disable=wrong-import-position
|
| 17 |
-
root_dir = os.path.dirname(os.path.
|
| 18 |
sys.path.append(root_dir)
|
| 19 |
|
| 20 |
from graphgen.graphgen import GraphGen
|
|
@@ -226,7 +226,7 @@ def run_graphgen(params, progress=gr.Progress()):
|
|
| 226 |
with (gr.Blocks(title="GraphGen Demo", theme=gr.themes.Glass(),
|
| 227 |
css=css) as demo):
|
| 228 |
# Header
|
| 229 |
-
gr.Image(value=
|
| 230 |
label="GraphGen Banner",
|
| 231 |
elem_id="banner",
|
| 232 |
interactive=False,
|
|
@@ -256,7 +256,7 @@ with (gr.Blocks(title="GraphGen Demo", theme=gr.themes.Glass(),
|
|
| 256 |
<a href="https://github.com/open-sciencelab/GraphGen/issues/10">
|
| 257 |
<img src="https://img.shields.io/github/stars/open-sciencelab/GraphGen?style=social" alt="GitHub Stars">
|
| 258 |
</a>
|
| 259 |
-
<a href="https://
|
| 260 |
<img src="https://img.shields.io/badge/arXiv-pdf-yellow" alt="arXiv">
|
| 261 |
</a>
|
| 262 |
</div>
|
|
|
|
| 8 |
|
| 9 |
from gradio_i18n import Translate, gettext as _
|
| 10 |
|
| 11 |
+
from webui.base import GraphGenParams
|
| 12 |
+
from webui.test_api import test_api_connection
|
| 13 |
+
from webui.cache_utils import setup_workspace, cleanup_workspace
|
| 14 |
+
from webui.count_tokens import count_tokens
|
| 15 |
|
| 16 |
# pylint: disable=wrong-import-position
|
| 17 |
+
root_dir = os.path.dirname(os.path.abspath(__file__))
|
| 18 |
sys.path.append(root_dir)
|
| 19 |
|
| 20 |
from graphgen.graphgen import GraphGen
|
|
|
|
| 226 |
with (gr.Blocks(title="GraphGen Demo", theme=gr.themes.Glass(),
|
| 227 |
css=css) as demo):
|
| 228 |
# Header
|
| 229 |
+
gr.Image(value="https://github.com/open-sciencelab/GraphGen/blob/main/resources/images/logo.png?raw=true",
|
| 230 |
label="GraphGen Banner",
|
| 231 |
elem_id="banner",
|
| 232 |
interactive=False,
|
|
|
|
| 256 |
<a href="https://github.com/open-sciencelab/GraphGen/issues/10">
|
| 257 |
<img src="https://img.shields.io/github/stars/open-sciencelab/GraphGen?style=social" alt="GitHub Stars">
|
| 258 |
</a>
|
| 259 |
+
<a href="https://arxiv.org/abs/2505.20416">
|
| 260 |
<img src="https://img.shields.io/badge/arXiv-pdf-yellow" alt="arXiv">
|
| 261 |
</a>
|
| 262 |
</div>
|