Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,14 @@ def bardChat(data):
|
|
33 |
|
34 |
def responsenew(data):
|
35 |
return bardChat(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
# remind_val = ["create a reminder", "create reminder", "remind me"]
|
38 |
# if remind_val in data:
|
@@ -40,18 +48,18 @@ def responsenew(data):
|
|
40 |
# else:
|
41 |
# return bardChat(data)
|
42 |
|
43 |
-
with gr.Blocks() as demo:
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
if __name__ == "__main__":
|
57 |
-
|
|
|
33 |
|
34 |
def responsenew(data):
|
35 |
return bardChat(data)
|
36 |
+
|
37 |
+
|
38 |
+
gradio_interface = gradio.Interface(
|
39 |
+
fn = responsenew,
|
40 |
+
inputs = "text",
|
41 |
+
outputs = "text"
|
42 |
+
)
|
43 |
+
gradio_interface.launch()
|
44 |
|
45 |
# remind_val = ["create a reminder", "create reminder", "remind me"]
|
46 |
# if remind_val in data:
|
|
|
48 |
# else:
|
49 |
# return bardChat(data)
|
50 |
|
51 |
+
# with gr.Blocks() as demo:
|
52 |
+
# chatbot = gr.Chatbot()
|
53 |
+
# msg = gr.Textbox()
|
54 |
+
# clear = gr.ClearButton([msg, chatbot])
|
55 |
|
56 |
+
# def respond(message, chat_history):
|
57 |
+
# bot_message = responsenew(message)
|
58 |
+
# chat_history.append((message, bot_message))
|
59 |
+
# time.sleep(2)
|
60 |
+
# return "", chat_history
|
61 |
|
62 |
+
# msg.submit(respond, [msg, chatbot], [msg, chatbot])
|
63 |
|
64 |
+
# if __name__ == "__main__":
|
65 |
+
# demo.launch()
|