MaziyarPanahi commited on
Commit
58cf028
1 Parent(s): 8eae1e0

Update app.py (#25)

Browse files

- Update app.py (50c4d8039a79696515bc40a973242c33380d4ca8)

Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -66,11 +66,11 @@ def bot_streaming(message, history):
66
  buffer = ""
67
  for new_text in streamer:
68
 
69
- buffer += new_text
70
-
71
- generated_text_without_prompt = buffer[len(text_prompt):]
72
- time.sleep(0.04)
73
- yield generated_text_without_prompt
74
 
75
 
76
  demo = gr.ChatInterface(fn=bot_streaming, css=CSS, fill_height=True, title="LLaVA Llama-3-8B", examples=[{"text": "What is on the flower?", "files":["./bee.jpg"]},
 
66
  buffer = ""
67
  for new_text in streamer:
68
 
69
+ buffer += new_text
70
+
71
+ generated_text_without_prompt = buffer[len(text_prompt):]
72
+ time.sleep(0.04)
73
+ yield generated_text_without_prompt
74
 
75
 
76
  demo = gr.ChatInterface(fn=bot_streaming, css=CSS, fill_height=True, title="LLaVA Llama-3-8B", examples=[{"text": "What is on the flower?", "files":["./bee.jpg"]},