sabssag commited on
Commit
4754e4d
·
verified ·
1 Parent(s): fdd47e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 (ensure there is no extra space)
12
- zip_model_path = 'bart_model-20240724T051306Z-001.zip'
13
 
14
  # Define the directory to extract the model
15
  model_dir = './model'
@@ -28,7 +28,7 @@ print("Model Path:", model_path)
28
  if not os.path.exists(model_path):
29
  st.error(f"Model directory {model_path} does not exist or is incorrect.")
30
  # Print out contents of model_dir for further debugging
31
- print("Contents of model_dir:", os.listdir(model_dir))
32
  else:
33
  # Load the tokenizer and model from the extracted directory
34
  tokenizer = BartTokenizer.from_pretrained(model_path)
 
9
  from nltk.tokenize import sent_tokenize
10
 
11
  # Define the path to the saved model zip file (ensure there is no extra space)
12
+ zip_model_path = 'bartzip.zip'
13
 
14
  # Define the directory to extract the model
15
  model_dir = './model'
 
28
  if not os.path.exists(model_path):
29
  st.error(f"Model directory {model_path} does not exist or is incorrect.")
30
  # Print out contents of model_dir for further debugging
31
+ # print("Contents of model_dir:", os.listdir(model_dir))
32
  else:
33
  # Load the tokenizer and model from the extracted directory
34
  tokenizer = BartTokenizer.from_pretrained(model_path)