chansung commited on
Commit
9ea7354
β€’
1 Parent(s): f265a2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -20,8 +20,10 @@ from paper.download import (
20
  )
21
  from paper.parser import extract_text_and_figures
22
  from gen.gemini import get_basic_qa, get_deep_qa
 
23
  from constants.styles import STYLE
24
  from constants.js import UPDATE_SEARCH_RESULTS, UPDATE_IF_TYPE
 
25
 
26
  from apscheduler.schedulers.background import BackgroundScheduler
27
 
@@ -34,10 +36,7 @@ def count_nans(row):
34
 
35
  return count
36
 
37
- gemini_api_key = os.getenv("GEMINI_API_KEY")
38
- hf_token = os.getenv("HF_TOKEN")
39
- dataset_repo_id = os.getenv("SOURCE_DATA_REPO_ID") # "chansung/auto-paper-qa2"
40
- request_arxiv_repo_id = os.getenv("REQUEST_DATA_REPO_ID") # "chansung/requested-arxiv-ids-3"
41
 
42
  ds = datasets.load_dataset(dataset_repo_id)
43
  request_ds = datasets.load_dataset(request_arxiv_repo_id)
 
20
  )
21
  from paper.parser import extract_text_and_figures
22
  from gen.gemini import get_basic_qa, get_deep_qa
23
+
24
  from constants.styles import STYLE
25
  from constants.js import UPDATE_SEARCH_RESULTS, UPDATE_IF_TYPE
26
+ from constants.utils import get_secrets
27
 
28
  from apscheduler.schedulers.background import BackgroundScheduler
29
 
 
36
 
37
  return count
38
 
39
+ gemini_api_key, hf_token, dataset_repo_id, request_arxiv_repo_id = get_secrets()
 
 
 
40
 
41
  ds = datasets.load_dataset(dataset_repo_id)
42
  request_ds = datasets.load_dataset(request_arxiv_repo_id)