Spaces:
Running
Running
Update app.py
Browse filesprint("HF_TOKEN loaded:", HF_TOKEN is not None)
if HF_TOKEN:
print("HF_TOKEN length:", len(HF_TOKEN))
print("HF_TOKEN preview:", HF_TOKEN[:6] + "..." + HF_TOKEN[-4:])
else:
print("HF_TOKEN is None or empty")
app.py
CHANGED
|
@@ -169,7 +169,13 @@ def load_pdf(file, state):
|
|
| 169 |
|
| 170 |
def answer_question(question, state):
|
| 171 |
|
| 172 |
-
print("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
if not question.strip():
|
| 175 |
return "Please enter a question."
|
|
|
|
| 169 |
|
| 170 |
def answer_question(question, state):
|
| 171 |
|
| 172 |
+
print("HF_TOKEN loaded:", HF_TOKEN is not None)
|
| 173 |
+
|
| 174 |
+
if HF_TOKEN:
|
| 175 |
+
print("HF_TOKEN length:", len(HF_TOKEN))
|
| 176 |
+
print("HF_TOKEN preview:", HF_TOKEN[:6] + "..." + HF_TOKEN[-4:])
|
| 177 |
+
else:
|
| 178 |
+
print("HF_TOKEN is None or empty")
|
| 179 |
|
| 180 |
if not question.strip():
|
| 181 |
return "Please enter a question."
|