rishiraj commited on
Commit
16defe0
1 Parent(s): 4ec5cbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -73,13 +73,13 @@ def generate(
73
  prompt = prompt.replace(image, image_description)
74
  print(prompt)
75
  formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history, custom_prompt)
76
- stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
77
  output = ""
78
-
79
  for response in stream:
80
  output += response.token.text
81
- yield output
82
- return output
 
83
 
84
 
85
  additional_inputs=[
 
73
  prompt = prompt.replace(image, image_description)
74
  print(prompt)
75
  formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history, custom_prompt)
76
+ stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=True)
77
  output = ""
 
78
  for response in stream:
79
  output += response.token.text
80
+ yield [(prompt,output)]
81
+ history.append((prompt,output))
82
+ yield history
83
 
84
 
85
  additional_inputs=[