Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -234,18 +234,14 @@ NEWS_REPORTER="""You are an Expert News Aggregator. Your duty is to compress al
|
|
234 |
Add NEW DATA that you recieve to your CURRENT DATA by combining and reformatting when needed.
|
235 |
Output Format:
|
236 |
[
|
237 |
-
{
|
238 |
-
'Title': 'title of the first article',
|
239 |
'Description': 'description of the article',
|
240 |
'Article': 'your custom written article',
|
241 |
-
'Links': 'all source links that have contributed to the article'
|
242 |
-
|
243 |
-
{
|
244 |
-
'Title': 'title of the second article',
|
245 |
'Description': 'description of the article',
|
246 |
'Article': 'your custom written article',
|
247 |
-
'Links': 'all source links that have contributed to the article'
|
248 |
-
}
|
249 |
]
|
250 |
News Articles:
|
251 |
{new_data}
|
@@ -305,7 +301,7 @@ def summarize(inp,history,data=None):
|
|
305 |
out_json=""
|
306 |
for line in resp.split("\n"):
|
307 |
out_json+=line.replace("\n","")
|
308 |
-
out_box.append(resp.strip("</s>"))
|
309 |
print("ADDING")
|
310 |
yield "", [(inp,resp)],out_box
|
311 |
|
|
|
234 |
Add NEW DATA that you recieve to your CURRENT DATA by combining and reformatting when needed.
|
235 |
Output Format:
|
236 |
[
|
237 |
+
{'Title': 'title of the first article',
|
|
|
238 |
'Description': 'description of the article',
|
239 |
'Article': 'your custom written article',
|
240 |
+
'Links': 'all source links that have contributed to the article'},
|
241 |
+
{'Title': 'title of the second article',
|
|
|
|
|
242 |
'Description': 'description of the article',
|
243 |
'Article': 'your custom written article',
|
244 |
+
'Links': 'all source links that have contributed to the article'}
|
|
|
245 |
]
|
246 |
News Articles:
|
247 |
{new_data}
|
|
|
301 |
out_json=""
|
302 |
for line in resp.split("\n"):
|
303 |
out_json+=line.replace("\n","")
|
304 |
+
out_box.append(str(resp.strip("</s>")))
|
305 |
print("ADDING")
|
306 |
yield "", [(inp,resp)],out_box
|
307 |
|