bobpopboom commited on
Commit
3f3da62
·
verified ·
1 Parent(s): abe2d0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
- from transformers import pipeline
3
-
4
- model_id = "thrishala/mental_health_chatbot"
5
 
6
  model_id = "thrishala/mental_health_chatbot"
7
 
@@ -49,6 +48,7 @@ def respond(
49
  print(f"Error during generation: {e}")
50
  yield "An error occurred during generation." #Handle generation errors.
51
 
 
52
  # 4. Gradio Interface (No changes needed here)
53
  demo = gr.ChatInterface(
54
  respond,
 
1
  import gradio as gr
2
+ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
3
+ import torch
 
4
 
5
  model_id = "thrishala/mental_health_chatbot"
6
 
 
48
  print(f"Error during generation: {e}")
49
  yield "An error occurred during generation." #Handle generation errors.
50
 
51
+
52
  # 4. Gradio Interface (No changes needed here)
53
  demo = gr.ChatInterface(
54
  respond,