jonaschua commited on
Commit
0ee8f2a
·
verified ·
1 Parent(s): e050c5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -103,7 +103,7 @@ def respond(message, history: list[tuple[str, str]], model, system_message, max_
103
  response += token
104
  yield response
105
 
106
- if mode == "text-to-text":
107
  demo = gr.ChatInterface(
108
  respond,
109
  stop_btn = "Stop generation",
@@ -120,7 +120,7 @@ if mode == "text-to-text":
120
  ]
121
  )
122
 
123
- elif mode == "image-to-text":
124
  demo = gr.ChatInterface(
125
  respond,
126
  stop_btn = "Stop generation",
 
103
  response += token
104
  yield response
105
 
106
+ while mode == "text-to-text":
107
  demo = gr.ChatInterface(
108
  respond,
109
  stop_btn = "Stop generation",
 
120
  ]
121
  )
122
 
123
+ while mode == "image-to-text":
124
  demo = gr.ChatInterface(
125
  respond,
126
  stop_btn = "Stop generation",