Spaces:
Running
Running
feat: well answered sample questions added
Browse files- .gitignore +3 -1
- app.py +8 -7
.gitignore
CHANGED
@@ -1 +1,3 @@
|
|
1 |
-
.hypothesis
|
|
|
|
|
|
1 |
+
.hypothesis
|
2 |
+
__pycache__
|
3 |
+
.env
|
app.py
CHANGED
@@ -8,9 +8,8 @@ from model import encode_dpr_question, get_dpr_encoder
|
|
8 |
from model import summarize_text, get_summarizer
|
9 |
from model import ask_reader, get_reader
|
10 |
|
11 |
-
|
12 |
TITLE = 'ReSRer: Retriever-Summarizer-Reader'
|
13 |
-
INITIAL = "What is the population of NYC"
|
14 |
|
15 |
st.set_page_config(page_title=TITLE)
|
16 |
st.header(TITLE)
|
@@ -57,11 +56,13 @@ st.markdown(styl, unsafe_allow_html=True)
|
|
57 |
|
58 |
|
59 |
question = st.text_input("Question", INITIAL)
|
60 |
-
col1, col2 = st.columns(
|
61 |
-
if col1.button("
|
62 |
-
question = "
|
63 |
-
if col2.button("
|
64 |
-
question = "
|
|
|
|
|
65 |
|
66 |
|
67 |
@torch.inference_mode()
|
|
|
8 |
from model import summarize_text, get_summarizer
|
9 |
from model import ask_reader, get_reader
|
10 |
|
|
|
11 |
TITLE = 'ReSRer: Retriever-Summarizer-Reader'
|
12 |
+
INITIAL = "What is the population of NYC?"
|
13 |
|
14 |
st.set_page_config(page_title=TITLE)
|
15 |
st.header(TITLE)
|
|
|
56 |
|
57 |
|
58 |
question = st.text_input("Question", INITIAL)
|
59 |
+
col1, col2, col3 = st.columns(3)
|
60 |
+
if col1.button("What is the capital of South Korea?"):
|
61 |
+
question = "What is the capital of South Korea?"
|
62 |
+
if col2.button("What is the most famous building in Paris?"):
|
63 |
+
question = "What is the most famous building in Paris?"
|
64 |
+
if col3.button("Who is the actor of Harry Potter?"):
|
65 |
+
question = "Who is the actor of Harry Potter?"
|
66 |
|
67 |
|
68 |
@torch.inference_mode()
|