sabssag commited on
Commit
1ae8aab
·
verified ·
1 Parent(s): dd87438

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,7 @@ nltk.download('punkt')
9
  from nltk.tokenize import sent_tokenize
10
 
11
  # Define the path to the saved model zip file
12
- zip_model_path = 'T5_samsum-20240723T171755Z-001.zip'
13
 
14
  # Define the directory to extract the model
15
  model_dir = './model'
@@ -19,7 +19,7 @@ with zipfile.ZipFile(zip_model_path, 'r') as zip_ref:
19
  zip_ref.extractall(model_dir)
20
 
21
  # After unzipping, the model should be in a specific directory, check the directory structure
22
- model_path = os.path.join(model_dir, 'T5_samsum')
23
 
24
  # Verify that the directory exists and contains the necessary files
25
  if not os.path.exists(model_path):
@@ -33,7 +33,7 @@ else:
33
  summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
34
 
35
  # Set the title for the Streamlit app
36
- st.title("T5 Summary Generator")
37
 
38
  # Text input for the user
39
  text = st.text_area("Enter your text: ")
 
9
  from nltk.tokenize import sent_tokenize
10
 
11
  # Define the path to the saved model zip file
12
+ zip_model_path = 'bart_model-20240724T051306Z-001.zip'
13
 
14
  # Define the directory to extract the model
15
  model_dir = './model'
 
19
  zip_ref.extractall(model_dir)
20
 
21
  # After unzipping, the model should be in a specific directory, check the directory structure
22
+ model_path = os.path.join(model_dir, 'Bart_model')
23
 
24
  # Verify that the directory exists and contains the necessary files
25
  if not os.path.exists(model_path):
 
33
  summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
34
 
35
  # Set the title for the Streamlit app
36
+ st.title("BART Summary Generator")
37
 
38
  # Text input for the user
39
  text = st.text_area("Enter your text: ")