rexrex9 commited on
Commit ·
5485b1f
1
Parent(s): a1ee37d
- app.py +5 -5
- content/ad.py +2 -0
- content/conn.py +1 -1
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from content.conn import chat
|
|
|
|
| 3 |
def greet(input):
|
| 4 |
-
return chat(input)
|
| 5 |
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
demo
|
| 10 |
-
demo.launch(share=True)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from content.conn import chat
|
| 3 |
+
from content.ad import T
|
| 4 |
def greet(input):
|
| 5 |
+
return chat(input) + '\n\n' + T
|
| 6 |
|
| 7 |
|
| 8 |
+
if __name__ == '__main__':
|
| 9 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 10 |
+
demo.launch(share=True)
|
|
|
content/ad.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
T = '欢迎使用Knn3 Network TypoX 1.0'
|
content/conn.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
base_url = 'https://api.zendao.ai/api'
|
| 5 |
-
def chat(text,lang='
|
| 6 |
chat_id = '6449950563'
|
| 7 |
# 首字母大写
|
| 8 |
lang = lang[0].upper() + lang[1:]
|
|
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
base_url = 'https://api.zendao.ai/api'
|
| 5 |
+
def chat(text,lang='Cn'):
|
| 6 |
chat_id = '6449950563'
|
| 7 |
# 首字母大写
|
| 8 |
lang = lang[0].upper() + lang[1:]
|