Robert Pardela commited on
Commit
10b3a00
·
1 Parent(s): 258eb8f
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -6,17 +6,17 @@ chatbot = pipeline(model="Falconsai/medical_summarization")
6
  message_list = []
7
  response_list = []
8
 
9
- # def vanilla_chatbot(message, history):
10
- # conversation = Conversation(text=message, past_user_inputs=message_list, generated_responses=response_list)
11
- # conversation = chatbot(conversation)
12
 
13
- # return conversation.generated_responses[-1]
14
 
15
- # demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Test medical summarization chatbot", description="Enter text to summarize.")
16
 
17
- def responseFun(message, history):
18
- return history[len(history) - 1]
19
 
20
- demo_chatbot = gr.ChatInterface(responseFun, title="Test medical summarization chatbot", description="Enter text to summarize.")
21
 
22
  demo_chatbot.launch()
 
6
  message_list = []
7
  response_list = []
8
 
9
+ def vanilla_chatbot(message, history):
10
+ conversation = Conversation(text=message, past_user_inputs=message_list, generated_responses=response_list)
11
+ conversation = chatbot(conversation)
12
 
13
+ return conversation.generated_responses[-1]
14
 
15
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Test medical summarization chatbot", description="Enter text to summarize.")
16
 
17
+ # def responseFun(message, history):
18
+ # return history[len(history) - 1]
19
 
20
+ # demo_chatbot = gr.ChatInterface(responseFun, title="Test medical summarization chatbot", description="Enter text to summarize.")
21
 
22
  demo_chatbot.launch()