Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,22 +6,12 @@ import PyPDF2
|
|
6 |
import docx2txt
|
7 |
import huggingface_hub
|
8 |
|
|
|
9 |
import os
|
10 |
-
os.environ[
|
11 |
-
os.environ['HF_USERNAME'] = 'Grey01'
|
12 |
|
13 |
|
14 |
-
|
15 |
-
from huggingface_hub import whoami
|
16 |
-
|
17 |
-
# Get the username
|
18 |
-
hf_username = whoami()['name']
|
19 |
-
|
20 |
-
# Define the model repository
|
21 |
-
model_repo = f'{hf_username}/bart_billsum'
|
22 |
-
|
23 |
-
# Load the Keras NLP model
|
24 |
-
bart_billsum = keras_nlp.models.BartSeq2SeqLM.from_preset(model_repo)
|
25 |
|
26 |
st.title("SummarizeIt")
|
27 |
|
|
|
6 |
import docx2txt
|
7 |
import huggingface_hub
|
8 |
|
9 |
+
# Available backend options are: "jax", "tensorflow", "torch".
|
10 |
import os
|
11 |
+
os.environ["KERAS_BACKEND"] = "tensorflow"
|
|
|
12 |
|
13 |
|
14 |
+
bart_billsum = keras_nlp.models.BartSeq2SeqLM.from_preset("hf://Grey01/bart_billsum")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
st.title("SummarizeIt")
|
17 |
|