isayahc commited on
Commit
e9acb87
1 Parent(s): 3116721

added return statements to fixed Nonetype error

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -14,6 +14,9 @@ from qa import qa
14
  ####
15
 
16
  def create_gradio_interface(qa:RetrievalQAWithSourcesChain):
 
 
 
17
  def add_text(history, text):
18
  history = history + [(text, None)]
19
  return history, ""
@@ -63,6 +66,7 @@ def create_gradio_interface(qa:RetrievalQAWithSourcesChain):
63
  bot, chatbot, chatbot
64
  )
65
  #clear.click(lambda: None, None, chatbot, queue=False)
 
66
 
67
  if __name__ == "__main__":
68
  demo = create_gradio_interface(qa)
 
14
  ####
15
 
16
  def create_gradio_interface(qa:RetrievalQAWithSourcesChain):
17
+ """
18
+ Create a gradio interface for the QA model
19
+ """
20
  def add_text(history, text):
21
  history = history + [(text, None)]
22
  return history, ""
 
66
  bot, chatbot, chatbot
67
  )
68
  #clear.click(lambda: None, None, chatbot, queue=False)
69
+ return demo
70
 
71
  if __name__ == "__main__":
72
  demo = create_gradio_interface(qa)