Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ def run_gpt(
|
|
85 |
|
86 |
|
87 |
#formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
88 |
-
|
89 |
|
90 |
stream = client.text_generation(content, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
91 |
resp = ""
|
@@ -163,6 +163,7 @@ def summarize(inp,history,data=None):
|
|
163 |
|
164 |
#content = NEWS_REPORTER.format(output_format=output_format,new_data=str(new_data.replace("{","").replace("}","")))
|
165 |
content = NEWS_REPORTER.format(output_format=output_format,new_data=str(new_data))
|
|
|
166 |
stream = client.text_generation(content, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
167 |
for response in stream:
|
168 |
resp += response.token.text
|
|
|
85 |
|
86 |
|
87 |
#formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
88 |
+
formatted_prompt = format_prompt(f'{content}', **prompt_kwargs['history'])
|
89 |
|
90 |
stream = client.text_generation(content, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
91 |
resp = ""
|
|
|
163 |
|
164 |
#content = NEWS_REPORTER.format(output_format=output_format,new_data=str(new_data.replace("{","").replace("}","")))
|
165 |
content = NEWS_REPORTER.format(output_format=output_format,new_data=str(new_data))
|
166 |
+
formatted=format_prompt(content,history)
|
167 |
stream = client.text_generation(content, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
168 |
for response in stream:
|
169 |
resp += response.token.text
|