Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 = '
|
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)
|