sabssag commited on
Commit
e3f1e79
·
verified ·
1 Parent(s): d7a85d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -2,8 +2,16 @@ import streamlit as st
2
 
3
  from transformers import T5Tokenizer, TFAutoModelForSeq2SeqLM, pipeline
4
 
 
 
 
 
 
 
 
 
5
  # Define the path to the saved model
6
- model_path = '/T5_samsum-20240723T171755Z-001.zip'
7
 
8
  # Load the tokenizer and model
9
  tokenizer = T5Tokenizer.from_pretrained(model_path)
 
2
 
3
  from transformers import T5Tokenizer, TFAutoModelForSeq2SeqLM, pipeline
4
 
5
+ import zipfile
6
+ # Define the path to the saved model zip file
7
+ zip_model_path = 'T5_samsum-20240723T171755Z-001.zip'
8
+
9
+ # Unzip the model
10
+ with zipfile.ZipFile(zip_model_path, 'r') as zip_ref:
11
+ zip_ref.extractall('./model')
12
+
13
  # Define the path to the saved model
14
+ model_path = './model/T5_samsum-20240723T171755Z-001'
15
 
16
  # Load the tokenizer and model
17
  tokenizer = T5Tokenizer.from_pretrained(model_path)