ujwal55 commited on
Commit
3037415
·
verified ·
1 Parent(s): 0a11aca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -3,7 +3,8 @@ from utils import extract_text, anonymize_text, score_synopsis
3
  from llama_cpp import Llama
4
  import os
5
  from huggingface_hub import snapshot_download
6
- import os
 
7
 
8
  st.set_page_config(page_title="Synopsis Scorer", layout="wide")
9
 
@@ -20,6 +21,8 @@ if not hf_token and not os.path.exists("models/gemma-3-4b-it-q4_0.gguf"):
20
  st.warning("Hugging Face token not found. Please add it to your secrets or environment variables.")
21
  hf_token = st.text_input("Enter your Hugging Face token:", type="password")
22
 
 
 
23
  # Choose a directory to store the model
24
  model_dir = "./gemma-3-4b-it-qat-q4_0"
25
 
 
3
  from llama_cpp import Llama
4
  import os
5
  from huggingface_hub import snapshot_download
6
+ from huggingface_hub import login
7
+
8
 
9
  st.set_page_config(page_title="Synopsis Scorer", layout="wide")
10
 
 
21
  st.warning("Hugging Face token not found. Please add it to your secrets or environment variables.")
22
  hf_token = st.text_input("Enter your Hugging Face token:", type="password")
23
 
24
+ login(hf_token)
25
+
26
  # Choose a directory to store the model
27
  model_dir = "./gemma-3-4b-it-qat-q4_0"
28