Spaces:
Runtime error
Runtime error
Aakash Goel
commited on
Commit
·
c582d76
1
Parent(s):
8e2b825
log download 3
Browse files- code/qa.py +2 -1
- results/df_log_file.csv +4 -0
code/qa.py
CHANGED
@@ -19,7 +19,7 @@ def load_model():
|
|
19 |
# st.markdown(href,unsafe_allow_html=True)
|
20 |
|
21 |
#function to convert any dataframe to a csv file
|
22 |
-
@st.cache
|
23 |
def csv_downloader(df):
|
24 |
# IMPORTANT: Cache the conversion to prevent computation on every rerun
|
25 |
res = df.to_csv().encode('utf-8')
|
@@ -49,6 +49,7 @@ st.title("Answering questions from text")
|
|
49 |
st.write("Upload text, pose questions, get answers")
|
50 |
|
51 |
# Load file
|
|
|
52 |
raw_text = load_file()
|
53 |
if raw_text != None and raw_text != '':
|
54 |
|
|
|
19 |
# st.markdown(href,unsafe_allow_html=True)
|
20 |
|
21 |
#function to convert any dataframe to a csv file
|
22 |
+
# @st.cache
|
23 |
def csv_downloader(df):
|
24 |
# IMPORTANT: Cache the conversion to prevent computation on every rerun
|
25 |
res = df.to_csv().encode('utf-8')
|
|
|
49 |
st.write("Upload text, pose questions, get answers")
|
50 |
|
51 |
# Load file
|
52 |
+
st.text("Disclaimer: This app stores user's input for model improvement purposes !!")
|
53 |
raw_text = load_file()
|
54 |
if raw_text != None and raw_text != '':
|
55 |
|
results/df_log_file.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
,TimeStamp,Question,Input,Answer,Score
|
2 |
+
0,2022-09-20 19:58:53.622885,What is Python ?,"Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum \
|
3 |
+
and first released in 1991, Python's design philosophy emphasizes code \
|
4 |
+
readability with its notable use of significant whitespace.","an interpreted, high-level, general-purpose programming language",0.45
|