Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,14 @@ import PyPDF2
|
|
| 6 |
import docx2txt
|
| 7 |
import huggingface_hub
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
hf_username = huggingface_hub.whoami()['name']
|
| 10 |
hf_url = f'hf://{hf_username}/bart_billsum'
|
| 11 |
|
|
|
|
| 6 |
import docx2txt
|
| 7 |
import huggingface_hub
|
| 8 |
|
| 9 |
+
import os
|
| 10 |
+
os.environ['KERAS_BACKEND'] = 'tensorflow'
|
| 11 |
+
os.environ['HF_USERNAME'] = 'Grey01'
|
| 12 |
+
|
| 13 |
+
import huggingface_hub
|
| 14 |
+
if 'HF_USERNAME' not in os.environ or 'HF_TOKEN' not in os.environ:
|
| 15 |
+
huggingface_hub.notebook_login()
|
| 16 |
+
|
| 17 |
hf_username = huggingface_hub.whoami()['name']
|
| 18 |
hf_url = f'hf://{hf_username}/bart_billsum'
|
| 19 |
|