Spaces:
Running
Running
admin
commited on
Commit
·
3789f5e
1
Parent(s):
9909b2f
sync ms
Browse files- app.py +5 -0
- modules/tools.py +9 -0
app.py
CHANGED
@@ -8,6 +8,7 @@ from modules.rct import rct_generator
|
|
8 |
from modules.smtp import smtp_tester
|
9 |
from modules.trans import translator
|
10 |
from modules.url import url_shortner
|
|
|
11 |
from utils import LANG
|
12 |
|
13 |
ZH2EN = {
|
@@ -21,6 +22,7 @@ ZH2EN = {
|
|
21 |
"SMTP 测试": "SMTP Test",
|
22 |
"翻译器": "Translator",
|
23 |
"短链接生成": "URL Shortner",
|
|
|
24 |
}
|
25 |
|
26 |
|
@@ -58,4 +60,7 @@ if __name__ == "__main__":
|
|
58 |
with gr.Tab(_L("短链接生成")):
|
59 |
url_shortner()
|
60 |
|
|
|
|
|
|
|
61 |
demo.launch()
|
|
|
8 |
from modules.smtp import smtp_tester
|
9 |
from modules.trans import translator
|
10 |
from modules.url import url_shortner
|
11 |
+
from modules.tools import webtools
|
12 |
from utils import LANG
|
13 |
|
14 |
ZH2EN = {
|
|
|
22 |
"SMTP 测试": "SMTP Test",
|
23 |
"翻译器": "Translator",
|
24 |
"短链接生成": "URL Shortner",
|
25 |
+
"在线编程辅助工具": "Web Tools",
|
26 |
}
|
27 |
|
28 |
|
|
|
60 |
with gr.Tab(_L("短链接生成")):
|
61 |
url_shortner()
|
62 |
|
63 |
+
with gr.Tab(_L("在线编程辅助工具")):
|
64 |
+
webtools()
|
65 |
+
|
66 |
demo.launch()
|
modules/tools.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from utils import LANG
|
3 |
+
|
4 |
+
|
5 |
+
def webtools():
|
6 |
+
domain = "static.hf.space" if LANG else "ms.show"
|
7 |
+
return gr.HTML(
|
8 |
+
f"<iframe src='https://genius-society-web-tools.{domain}' width='100%' style='aspect-ratio: 16 / 9;'></iframe>"
|
9 |
+
)
|