Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from http import HTTPStatus
|
3 |
import os
|
|
|
4 |
|
5 |
from dashscope import Application
|
6 |
|
@@ -19,20 +20,25 @@ def call_company(p):
|
|
19 |
else:
|
20 |
return response.output.text
|
21 |
|
|
|
|
|
|
|
22 |
|
23 |
def run_flow(scene, text):
|
24 |
print(scene, text)
|
25 |
-
if scene == "
|
26 |
-
|
|
|
|
|
27 |
else:
|
28 |
-
|
29 |
|
30 |
with gr.Blocks() as demo:
|
31 |
gr.Markdown("# 💰金融场景AI助手")
|
32 |
with gr.Row():
|
33 |
with gr.Column():
|
34 |
scene = gr.Dropdown(
|
35 |
-
["
|
36 |
)
|
37 |
text = gr.Textbox(label="输入")
|
38 |
btn = gr.Button("开始")
|
|
|
1 |
import gradio as gr
|
2 |
from http import HTTPStatus
|
3 |
import os
|
4 |
+
import requests
|
5 |
|
6 |
from dashscope import Application
|
7 |
|
|
|
20 |
else:
|
21 |
return response.output.text
|
22 |
|
23 |
+
def call_summary(p):
|
24 |
+
return "Working hard on it..."
|
25 |
+
|
26 |
|
27 |
def run_flow(scene, text):
|
28 |
print(scene, text)
|
29 |
+
if scene == "企业净调":
|
30 |
+
return call_company(text)
|
31 |
+
if scene == "企业舆情总结":
|
32 |
+
return call_summary(text)
|
33 |
else:
|
34 |
+
pass
|
35 |
|
36 |
with gr.Blocks() as demo:
|
37 |
gr.Markdown("# 💰金融场景AI助手")
|
38 |
with gr.Row():
|
39 |
with gr.Column():
|
40 |
scene = gr.Dropdown(
|
41 |
+
["企业净调", "企业舆情总结"], label="场景", info="请选择场景"
|
42 |
)
|
43 |
text = gr.Textbox(label="输入")
|
44 |
btn = gr.Button("开始")
|