Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
import openai
|
| 2 |
-
import pinecone
|
| 3 |
import streamlit_scrollable_textbox as stx
|
| 4 |
|
|
|
|
| 5 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
| 6 |
from utils import (
|
| 7 |
clean_entities,
|
| 8 |
create_dense_embeddings,
|
|
@@ -29,9 +32,6 @@ from utils import (
|
|
| 29 |
text_lookup,
|
| 30 |
)
|
| 31 |
|
| 32 |
-
st.set_page_config(layout="wide") # isort: skip
|
| 33 |
-
|
| 34 |
-
|
| 35 |
st.title("Abstractive Question Answering")
|
| 36 |
|
| 37 |
|
|
@@ -91,7 +91,7 @@ with st.sidebar:
|
|
| 91 |
|
| 92 |
with st.sidebar:
|
| 93 |
num_results = int(
|
| 94 |
-
st.number_input("Number of Results to query", 1, 15, value=
|
| 95 |
)
|
| 96 |
|
| 97 |
|
|
@@ -260,7 +260,7 @@ elif decoder_model == "FLAN-T5":
|
|
| 260 |
if submitted:
|
| 261 |
for context_text in context_list:
|
| 262 |
output_text.append(
|
| 263 |
-
flan_t5_pipeline("Summarize:" + context_text)[0][
|
| 264 |
"summary_text"
|
| 265 |
]
|
| 266 |
)
|
|
|
|
| 1 |
import openai
|
|
|
|
| 2 |
import streamlit_scrollable_textbox as stx
|
| 3 |
|
| 4 |
+
import pinecone
|
| 5 |
import streamlit as st
|
| 6 |
+
|
| 7 |
+
st.set_page_config(layout="wide") # isort: split
|
| 8 |
+
|
| 9 |
from utils import (
|
| 10 |
clean_entities,
|
| 11 |
create_dense_embeddings,
|
|
|
|
| 32 |
text_lookup,
|
| 33 |
)
|
| 34 |
|
|
|
|
|
|
|
|
|
|
| 35 |
st.title("Abstractive Question Answering")
|
| 36 |
|
| 37 |
|
|
|
|
| 91 |
|
| 92 |
with st.sidebar:
|
| 93 |
num_results = int(
|
| 94 |
+
st.number_input("Number of Results to query", 1, 15, value=5)
|
| 95 |
)
|
| 96 |
|
| 97 |
|
|
|
|
| 260 |
if submitted:
|
| 261 |
for context_text in context_list:
|
| 262 |
output_text.append(
|
| 263 |
+
flan_t5_pipeline("Summarize: " + context_text)[0][
|
| 264 |
"summary_text"
|
| 265 |
]
|
| 266 |
)
|