Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -89,6 +89,7 @@ decoder_models_choice = [
|
|
89 |
"GPT3 - (text-davinci-003)",
|
90 |
"T5",
|
91 |
"FLAN-T5",
|
|
|
92 |
]
|
93 |
|
94 |
with st.sidebar:
|
@@ -181,6 +182,17 @@ elif decoder_model == "FLAN-T5":
|
|
181 |
st.subheader("Answer:")
|
182 |
st.write(flan_t5_pipeline(generated_text)[0]["summary_text"])
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
with col1:
|
185 |
with st.expander("See Retrieved Text"):
|
186 |
for context_text in context_list:
|
|
|
89 |
"GPT3 - (text-davinci-003)",
|
90 |
"T5",
|
91 |
"FLAN-T5",
|
92 |
+
"GPT-J"
|
93 |
]
|
94 |
|
95 |
with st.sidebar:
|
|
|
182 |
st.subheader("Answer:")
|
183 |
st.write(flan_t5_pipeline(generated_text)[0]["summary_text"])
|
184 |
|
185 |
+
elif decoder_model == "GPTJ":
|
186 |
+
flan_t5_pipeline = get_gptj_model()
|
187 |
+
output_text = []
|
188 |
+
for context_text in context_list:
|
189 |
+
output_text.append(gptj_pipline(context_text)[0]["summary_text"])
|
190 |
+
generated_text = ". ".join(output_text)
|
191 |
+
with col2:
|
192 |
+
st.subheader("Answer:")
|
193 |
+
st.write(flan_t5_pipeline(generated_text)[0]["summary_text"])
|
194 |
+
|
195 |
+
|
196 |
with col1:
|
197 |
with st.expander("See Retrieved Text"):
|
198 |
for context_text in context_list:
|