Grey01 commited on
Commit
c5b57a7
·
verified ·
1 Parent(s): 34cd658

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -6,22 +6,12 @@ import PyPDF2
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
 
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