shaocongma commited on
Commit
78f4b41
1 Parent(s): 194e5ab
Files changed (2) hide show
  1. utils/references.py +0 -2
  2. worker.py +2 -1
utils/references.py CHANGED
@@ -209,8 +209,6 @@ def search_paper_ss(title):
209
  headers = {"Accept": "*/*"}
210
  response = requests.get(url, headers=headers, timeout=30)
211
  results = response.json()
212
- if results['total'] == 0:
213
- return {}
214
  raw_paper = results['data'][0]
215
  if raw_paper['tldr'] is not None:
216
  abstract = raw_paper['tldr']['text']
 
209
  headers = {"Accept": "*/*"}
210
  response = requests.get(url, headers=headers, timeout=30)
211
  results = response.json()
 
 
212
  raw_paper = results['data'][0]
213
  if raw_paper['tldr'] is not None:
214
  abstract = raw_paper['tldr']['text']
worker.py CHANGED
@@ -110,6 +110,7 @@ def modify_status(task_id, new_status):
110
  # Close the session
111
  session.close()
112
 
 
113
  #######################################################################################################################
114
  # Pipline
115
  #######################################################################################################################
@@ -154,7 +155,7 @@ def pipeline(message_count=0, query_interval=10):
154
  print("Local file path (ZIP): ", zip_path)
155
  print("Upload to S3: ", upload_to)
156
  upload_file(zip_path, upload_to)
157
- modify_status(task_id, 2) # status: 0 - pending (default), 1 - running, 2 - completed, 3 - failed, 4 - deleted
158
  print(f"Success in generating the paper.")
159
 
160
  # Complete.
 
110
  # Close the session
111
  session.close()
112
 
113
+
114
  #######################################################################################################################
115
  # Pipline
116
  #######################################################################################################################
 
155
  print("Local file path (ZIP): ", zip_path)
156
  print("Upload to S3: ", upload_to)
157
  upload_file(zip_path, upload_to)
158
+ modify_status(task_id, 2) # status: 0 - pending (default), 1 - running, 2 - completed, 3 - failed, 4 - deleted
159
  print(f"Success in generating the paper.")
160
 
161
  # Complete.