jbdel commited on
Commit
c47df04
1 Parent(s): 8f1a208
Files changed (2) hide show
  1. paper_chat_tab.py +2 -2
  2. requirements.txt +1 -1
paper_chat_tab.py CHANGED
@@ -167,7 +167,7 @@ def create_chat_interface(model_name, paper_content, hf_token_input):
167
  # Load the tokenizer from Hugging Face
168
  # tokenizer = AutoTokenizer.from_pretrained(model_name)
169
  tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B-Instruct",
170
- token=os.environ.get("HF_TOKEN"))
171
  tokenizer_cache[model_name] = tokenizer
172
  else:
173
  tokenizer = tokenizer_cache[model_name]
@@ -241,7 +241,7 @@ def create_chat_interface(model_name, paper_content, hf_token_input):
241
  final_messages.extend(messages)
242
 
243
  # Use the Hugging Face token if provided
244
- api_key = hf_token_value or os.environ.get("SAMBANOVA_API_KEY")
245
  if not api_key:
246
  raise ValueError("API token is not provided.")
247
 
 
167
  # Load the tokenizer from Hugging Face
168
  # tokenizer = AutoTokenizer.from_pretrained(model_name)
169
  tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B-Instruct",
170
+ token=os.getenv("HF_TOKEN"))
171
  tokenizer_cache[model_name] = tokenizer
172
  else:
173
  tokenizer = tokenizer_cache[model_name]
 
241
  final_messages.extend(messages)
242
 
243
  # Use the Hugging Face token if provided
244
+ api_key = hf_token_value or os.getenv("SAMBANOVA_API_KEY")
245
  if not api_key:
246
  raise ValueError("API token is not provided.")
247
 
requirements.txt CHANGED
@@ -4,7 +4,7 @@ datasets
4
  scholarly
5
  arxiv
6
  PyPDF2
7
- transformers
8
  beautifulsoup4
9
  openai
10
  # Set the primary index URL to PyTorch's CPU wheels
 
4
  scholarly
5
  arxiv
6
  PyPDF2
7
+ transformers=4.46.3
8
  beautifulsoup4
9
  openai
10
  # Set the primary index URL to PyTorch's CPU wheels