MaziyarPanahi commited on
Commit
5699a69
1 Parent(s): 70f2766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -41,9 +41,9 @@ def bot_streaming(message, history):
41
 
42
 
43
  try:
44
- if image is None:
45
- # Handle the case where image is None
46
- gr.Error("You need to upload an image for LLaVA to work.")
47
  except NameError:
48
  # Handle the case where 'image' is not defined at all
49
  gr.Error("You need to upload an image for LLaVA to work.")
@@ -69,7 +69,7 @@ def bot_streaming(message, history):
69
  buffer += new_text
70
 
71
  generated_text_without_prompt = buffer[len(text_prompt):]
72
- time.sleep(0.08)
73
  yield generated_text_without_prompt
74
 
75
 
 
41
 
42
 
43
  try:
44
+ if image is None:
45
+ # Handle the case where image is None
46
+ gr.Error("You need to upload an image for LLaVA to work.")
47
  except NameError:
48
  # Handle the case where 'image' is not defined at all
49
  gr.Error("You need to upload an image for LLaVA to work.")
 
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