akhaliq HF Staff commited on
Commit
ddfa99c
·
verified ·
1 Parent(s): 0c500f1

Update Gradio app with multiple files

Browse files
Files changed (2) hide show
  1. app.py +3 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -72,10 +72,10 @@ def respond(message, history):
72
  thread.start()
73
 
74
  # Stream the response
75
- history.append({"role": "assistant", "content": ""})
76
  for new_text in streamer:
77
- history[-1]["content"] += new_text
78
- yield history
79
 
80
 
81
  # Create the Gradio interface
 
72
  thread.start()
73
 
74
  # Stream the response
75
+ response = ""
76
  for new_text in streamer:
77
+ response += new_text
78
+ yield response
79
 
80
 
81
  # Create the Gradio interface
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
- git+https://github.com/huggingface/transformers
 
2
  torch
3
  accelerate
4
  bitsandbytes
 
1
+ gradio
2
+ transformers
3
  torch
4
  accelerate
5
  bitsandbytes