Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,10 @@ torch_dtype = torch.float32
|
|
9 |
# Configure cache directory
|
10 |
os.environ['HF_HOME'] = '/tmp/cache'
|
11 |
|
12 |
-
#
|
|
|
|
|
|
|
13 |
generator = pipeline(
|
14 |
"text-generation",
|
15 |
model="mistralai/Mistral-7B-Instruct-v0.2",
|
|
|
9 |
# Configure cache directory
|
10 |
os.environ['HF_HOME'] = '/tmp/cache'
|
11 |
|
12 |
+
# Optional: print token to verify it's passed at runtime
|
13 |
+
# print("HF Token:", os.environ.get("HUGGINGFACEHUB_API_TOKEN"))
|
14 |
+
|
15 |
+
# Load the model pipeline with auth token picked up automatically
|
16 |
generator = pipeline(
|
17 |
"text-generation",
|
18 |
model="mistralai/Mistral-7B-Instruct-v0.2",
|