Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,10 +72,15 @@ with gr.Blocks(css = "custom.css") as demo:
|
|
72 |
interactive=True,
|
73 |
#info = "Generate by Click, and can edit by yourself, look up Examples below"
|
74 |
)
|
75 |
-
|
76 |
clear = gr.Button("Clear")
|
|
|
77 |
|
78 |
-
|
|
|
|
|
|
|
|
|
79 |
bot, chatbot, chatbot
|
80 |
)
|
81 |
|
@@ -94,7 +99,6 @@ demo.launch()
|
|
94 |
'''
|
95 |
from gradio_client import Client
|
96 |
client = Client("http://localhost:7860/")
|
97 |
-
|
98 |
result = client.predict(
|
99 |
[["诸葛亮是哪个朝代的人?", "诸葛亮是三国时期的人。"],
|
100 |
["为什么说明朝是一个好的时代?", "因为出了王阳明。"],
|
|
|
72 |
interactive=True,
|
73 |
#info = "Generate by Click, and can edit by yourself, look up Examples below"
|
74 |
)
|
75 |
+
sub_button = gr.Button("Submit")
|
76 |
clear = gr.Button("Clear")
|
77 |
+
api_button = gr.Button("api", visible = False)
|
78 |
|
79 |
+
sub_button.click(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
80 |
+
bot, chatbot, chatbot
|
81 |
+
)
|
82 |
+
|
83 |
+
api_button.click(
|
84 |
bot, chatbot, chatbot
|
85 |
)
|
86 |
|
|
|
99 |
'''
|
100 |
from gradio_client import Client
|
101 |
client = Client("http://localhost:7860/")
|
|
|
102 |
result = client.predict(
|
103 |
[["诸葛亮是哪个朝代的人?", "诸葛亮是三国时期的人。"],
|
104 |
["为什么说明朝是一个好的时代?", "因为出了王阳明。"],
|