update code
Browse files
app.py
CHANGED
@@ -119,15 +119,13 @@ def main():
|
|
119 |
legacy=False,
|
120 |
model_max_length=1000,
|
121 |
trust_remote_code=True,
|
122 |
-
#cache_dir="model_cache"
|
123 |
)
|
124 |
-
base_model = "model_cache/models--ccdv--lsg-bart-base-16384-pubmed/snapshots/4072bc1a7a94e2b4fd860a5fdf1b71d0487dcf15"
|
125 |
#base_model = AutoModelForSeq2SeqLM.from_pretrained(
|
126 |
# checkpoint,
|
127 |
# torch_dtype=torch.float32,
|
128 |
# trust_remote_code=True,
|
129 |
-
# cache_dir="model_cache"
|
130 |
#)
|
|
|
131 |
else: # default Flan T5 small
|
132 |
checkpoint = "MBZUAI/LaMini-Flan-T5-77M"
|
133 |
tokenizer = AutoTokenizer.from_pretrained(
|
@@ -137,12 +135,11 @@ def main():
|
|
137 |
model_max_length=1000,
|
138 |
#cache_dir="model_cache"
|
139 |
)
|
140 |
-
base_model = "model_cache/models--MBZUAI--LaMini-Flan-T5-77M/snapshots/c5b12d50a2616b9670a57189be20055d1357b474"
|
141 |
#base_model = AutoModelForSeq2SeqLM.from_pretrained(
|
142 |
# checkpoint,
|
143 |
# torch_dtype=torch.float32,
|
144 |
-
# cache_dir="model_cache"
|
145 |
#)
|
|
|
146 |
with col2:
|
147 |
st.write("Skip any pages?")
|
148 |
skipfirst = st.checkbox("Skip first page")
|
|
|
119 |
legacy=False,
|
120 |
model_max_length=1000,
|
121 |
trust_remote_code=True,
|
|
|
122 |
)
|
|
|
123 |
#base_model = AutoModelForSeq2SeqLM.from_pretrained(
|
124 |
# checkpoint,
|
125 |
# torch_dtype=torch.float32,
|
126 |
# trust_remote_code=True,
|
|
|
127 |
#)
|
128 |
+
base_model = "model_cache/models--ccdv--lsg-bart-base-16384-pubmed/snapshots/4072bc1a7a94e2b4fd860a5fdf1b71d0487dcf15"
|
129 |
else: # default Flan T5 small
|
130 |
checkpoint = "MBZUAI/LaMini-Flan-T5-77M"
|
131 |
tokenizer = AutoTokenizer.from_pretrained(
|
|
|
135 |
model_max_length=1000,
|
136 |
#cache_dir="model_cache"
|
137 |
)
|
|
|
138 |
#base_model = AutoModelForSeq2SeqLM.from_pretrained(
|
139 |
# checkpoint,
|
140 |
# torch_dtype=torch.float32,
|
|
|
141 |
#)
|
142 |
+
base_model = "model_cache/models--MBZUAI--LaMini-Flan-T5-77M/snapshots/c5b12d50a2616b9670a57189be20055d1357b474"
|
143 |
with col2:
|
144 |
st.write("Skip any pages?")
|
145 |
skipfirst = st.checkbox("Skip first page")
|