Spaces:
Sleeping
Sleeping
openreviewer
commited on
Commit
•
fef7bd8
1
Parent(s):
3049f57
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -20,10 +20,10 @@ setup_logging()
|
|
20 |
paper_dir = 'path_to_temp_storage'
|
21 |
prompt_dir = 'iclr2024'
|
22 |
api_keys = {
|
23 |
-
'openai_api_key': os.environ.get('
|
24 |
-
'claude_api_key': os.environ.get('
|
25 |
-
'gemini_api_key': os.environ.get('
|
26 |
-
'commandr_api_key': os.environ.get('
|
27 |
}
|
28 |
|
29 |
use_real_api = True
|
|
|
20 |
paper_dir = 'path_to_temp_storage'
|
21 |
prompt_dir = 'iclr2024'
|
22 |
api_keys = {
|
23 |
+
'openai_api_key': os.environ.get('OPENAI_API_KEY'),
|
24 |
+
'claude_api_key': os.environ.get('ANTHROPIC_API_KEY'),
|
25 |
+
'gemini_api_key': os.environ.get('GEMINI_API_KEY'),
|
26 |
+
'commandr_api_key': os.environ.get('COMMANDR_API_KEY')
|
27 |
}
|
28 |
|
29 |
use_real_api = True
|
models.py
CHANGED
@@ -22,10 +22,10 @@ class PaperProcessor:
|
|
22 |
def __init__(self, prompt_dir, model, openai_api_key, claude_api_key, gemini_api_key, commandr_api_key):
|
23 |
self.prompt_dir = prompt_dir
|
24 |
self.model = model
|
25 |
-
self.openai_api_key =
|
26 |
-
self.claude_api_key =
|
27 |
-
self.gemini_api_key =
|
28 |
-
self.commandr_api_key =
|
29 |
|
30 |
def count_tokens(self, text):
|
31 |
return len(self.encoding.encode(text))
|
|
|
22 |
def __init__(self, prompt_dir, model, openai_api_key, claude_api_key, gemini_api_key, commandr_api_key):
|
23 |
self.prompt_dir = prompt_dir
|
24 |
self.model = model
|
25 |
+
self.openai_api_key = os.environ.get('OPENAI_API_KEY')
|
26 |
+
self.claude_api_key = os.environ.get('ANTHROPIC_API_KEY')
|
27 |
+
self.gemini_api_key = os.environ.get('GEMINI_API_KEY')
|
28 |
+
self.commandr_api_key = os.environ.get('COMMANDR_API_KEY')
|
29 |
|
30 |
def count_tokens(self, text):
|
31 |
return len(self.encoding.encode(text))
|
utils.py
CHANGED
@@ -37,6 +37,9 @@ def process_paper(pdf_file, paper_dir, prompt_dir, api_keys):
|
|
37 |
models = ['gpt-4-turbo-2024-04-09', 'gpt-4o', 'claude-3-opus-20240229', 'gemini-pro', 'command-r-plus']
|
38 |
selected_models = random.sample(models, 2)
|
39 |
|
|
|
|
|
|
|
40 |
reviews = []
|
41 |
|
42 |
def process_with_model(model):
|
|
|
37 |
models = ['gpt-4-turbo-2024-04-09', 'gpt-4o', 'claude-3-opus-20240229', 'gemini-pro', 'command-r-plus']
|
38 |
selected_models = random.sample(models, 2)
|
39 |
|
40 |
+
# REPLACE ONE OF THE MODELS WITH command-r-plus
|
41 |
+
# selected_models = ['gpt-4o', 'command-r-plus']
|
42 |
+
|
43 |
reviews = []
|
44 |
|
45 |
def process_with_model(model):
|