Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,16 +5,6 @@ import os
|
|
5 |
from huggingface_hub import snapshot_download
|
6 |
import os
|
7 |
|
8 |
-
# Choose a directory to store the model
|
9 |
-
model_dir = "./gemma-3-4b-it-qat-q4_0"
|
10 |
-
|
11 |
-
# Download the GGUF model
|
12 |
-
snapshot_download(
|
13 |
-
repo_id="google/gemma-3-4b-it-qat-q4_0-gguf",
|
14 |
-
local_dir=model_dir,
|
15 |
-
local_dir_use_symlinks=False # Ensures real files are written, not symlinks
|
16 |
-
)
|
17 |
-
|
18 |
st.set_page_config(page_title="Synopsis Scorer", layout="wide")
|
19 |
|
20 |
# --- Access Control ---
|
@@ -30,6 +20,15 @@ if not hf_token and not os.path.exists("models/gemma-3-4b-it-q4_0.gguf"):
|
|
30 |
st.warning("Hugging Face token not found. Please add it to your secrets or environment variables.")
|
31 |
hf_token = st.text_input("Enter your Hugging Face token:", type="password")
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
# --- File Upload ---
|
35 |
st.title("π Synopsis Scorer with Privacy Protection")
|
|
|
5 |
from huggingface_hub import snapshot_download
|
6 |
import os
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
st.set_page_config(page_title="Synopsis Scorer", layout="wide")
|
9 |
|
10 |
# --- Access Control ---
|
|
|
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 |
+
|
26 |
+
# Download the GGUF model
|
27 |
+
snapshot_download(
|
28 |
+
repo_id="google/gemma-3-4b-it-qat-q4_0-gguf",
|
29 |
+
local_dir=model_dir,
|
30 |
+
local_dir_use_symlinks=False # Ensures real files are written, not symlinks
|
31 |
+
)
|
32 |
|
33 |
# --- File Upload ---
|
34 |
st.title("π Synopsis Scorer with Privacy Protection")
|