prateekbh commited on
Commit
8e0a954
1 Parent(s): 78649d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,10 +28,10 @@ class StopOnTokens(StoppingCriteria):
28
  return False
29
 
30
  @torch.no_grad()
31
- def response(message, history, image):
32
  gr.Info('Starting...' + message)
33
  stop = StopOnTokens()
34
-
35
  messages = [{"role": "system", "content": "You are a helpful assistant."}]
36
 
37
  for user_msg, assistant_msg in history:
@@ -93,7 +93,7 @@ with gr.Blocks(css=css, js="bg-remove2.js") as demo:
93
 
94
  response_handler = (
95
  response,
96
- [message, chat, image],
97
  [chat]
98
  )
99
 
 
28
  return False
29
 
30
  @torch.no_grad()
31
+ def response(history, image):
32
  gr.Info('Starting...' + message)
33
  stop = StopOnTokens()
34
+ message = "Generate a product title for the image"
35
  messages = [{"role": "system", "content": "You are a helpful assistant."}]
36
 
37
  for user_msg, assistant_msg in history:
 
93
 
94
  response_handler = (
95
  response,
96
+ [chat, image],
97
  [chat]
98
  )
99