Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
chatbot = gr.ChatInterface(
|
| 8 |
-
respond,
|
| 9 |
type="messages",
|
| 10 |
title="Research Query Assistant",
|
| 11 |
-
description="Ask research questions,
|
| 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__":
|