Robert Pardela
commited on
Commit
•
085a76d
1
Parent(s):
758d5d3
time v3
Browse files
app.py
CHANGED
@@ -20,7 +20,12 @@ def vanilla_chatbot(message, history):
|
|
20 |
return to_return
|
21 |
|
22 |
def chat_bot(message, history):
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
demo_chatbot = gr.ChatInterface(chat_bot, title="Check medical chatbot", description="Enter question")
|
26 |
|
|
|
20 |
return to_return
|
21 |
|
22 |
def chat_bot(message, history):
|
23 |
+
start = time.perf_counter()
|
24 |
+
print("start chat")
|
25 |
+
to_return = chatbot(message, max_length=500)[0]['generated_text']
|
26 |
+
|
27 |
+
print ("Answer in %5.1f secs " % (start - time.perf_counter()))
|
28 |
+
return to_return
|
29 |
|
30 |
demo_chatbot = gr.ChatInterface(chat_bot, title="Check medical chatbot", description="Enter question")
|
31 |
|