Omnibus commited on
Commit
b313334
·
verified ·
1 Parent(s): e034dfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -233,12 +233,11 @@ def get_key(inp,data):
233
  NEWS_REPORTER="""You are an Expert News Aggregator. Your duty is to compress all of the News Articles you are given into 10 or more individual articles that capture the full context of the current news. Compile your articles into JSON format which the user will load into an RSS reader for other users to read.
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
- ]
242
 
243
  News Articles:
244
  {new_data}
@@ -301,8 +300,8 @@ def summarize(inp,history,data=None):
301
 
302
 
303
  #out_json=""
304
- out_json=resp.replace("\n","").strip("</s>")
305
- #out_box.append(out_json.strip("</s>"))
306
  out_box=eval(out_box)
307
  print("ADDING")
308
  yield "", [(inp,resp)],out_box
 
233
  NEWS_REPORTER="""You are an Expert News Aggregator. Your duty is to compress all of the News Articles you are given into 10 or more individual articles that capture the full context of the current news. Compile your articles into JSON format which the user will load into an RSS reader for other users to read.
234
  Add NEW DATA that you recieve to your CURRENT DATA by combining and reformatting when needed.
235
  Output Format:
 
236
  "title": "title of the first article",
237
  "description": "description of the article",
238
  "article": "your custom written article",
239
  "links": "all source links that have contributed to the article",
240
+
241
 
242
  News Articles:
243
  {new_data}
 
300
 
301
 
302
  #out_json=""
303
+ out_json=resp.replace("\n","").replace("```","")
304
+ out_box.append(out_json.strip("</s>"))
305
  out_box=eval(out_box)
306
  print("ADDING")
307
  yield "", [(inp,resp)],out_box