prateekbh commited on
Commit
dd1124f
1 Parent(s): 55dc744

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -67,11 +67,11 @@ def getProductDetails(history, image):
67
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
68
  output = ""
69
 
70
- # for response in stream:
71
- # output += response.token.text
72
- # yield [(prompt, output)]
73
  gr.Info('Gemma:' + product_description)
74
- # history.append((prompt, output))
75
  return history
76
 
77
  @torch.no_grad()
 
67
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
68
  output = ""
69
 
70
+ for response in stream:
71
+ output += response.token.text
72
+ yield [(prompt, output)]
73
  gr.Info('Gemma:' + product_description)
74
+ history.append((prompt, output))
75
  return history
76
 
77
  @torch.no_grad()