Subha95 commited on
Commit
ca3fbe5
·
verified ·
1 Parent(s): 6b348ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -1,14 +1,17 @@
1
- from ai_assistant import get_response
2
  import gradio as gr
 
3
 
4
  def respond(message, history):
5
- return get_response(message, history) # history is passed, ignored for now
 
 
 
6
 
7
  chatbot = gr.ChatInterface(
8
- respond,
9
  type="messages",
10
  title="Research Query Assistant",
11
- description="Ask research questions, get answers from Mistral on Hugging Face."
12
  )
13
 
14
  if __name__ == "__main__":
 
 
1
  import gradio as gr
2
+ from ai_assistant import get_response
3
 
4
  def respond(message, history):
5
+ print("📝 User question:", message)
6
+ answer = get_response(message, history)
7
+ print("🤖 Answer:", answer)
8
+ return answer
9
 
10
  chatbot = gr.ChatInterface(
11
+ fn=respond,
12
  type="messages",
13
  title="Research Query Assistant",
14
+ description="Ask research questions, answers come from Mistral 7B quantized model (CPU optimized)."
15
  )
16
 
17
  if __name__ == "__main__":