Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ with open('Response.json', 'r') as file:
|
|
17 |
|
18 |
st.title("MCQs Creator Application")
|
19 |
|
20 |
-
with st.
|
21 |
uploader_file = st.file_uploader("Upload a PDF or Txt file")
|
22 |
mcq_count = st.text_input("No. of MCQS")
|
23 |
subject = st.text_input("Insert subject", max_chars=20)
|
@@ -63,18 +63,19 @@ with st.markdown("user_inputs"):
|
|
63 |
else:
|
64 |
st.write(response)
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
|
80 |
|
|
|
17 |
|
18 |
st.title("MCQs Creator Application")
|
19 |
|
20 |
+
with st.form("user_inputs"):
|
21 |
uploader_file = st.file_uploader("Upload a PDF or Txt file")
|
22 |
mcq_count = st.text_input("No. of MCQS")
|
23 |
subject = st.text_input("Insert subject", max_chars=20)
|
|
|
63 |
else:
|
64 |
st.write(response)
|
65 |
|
66 |
+
if button:
|
67 |
+
csv = st.download_button(
|
68 |
+
label="Download as CSV",
|
69 |
+
data=df.to_csv(index=False).encode("utf-8"),
|
70 |
+
file_name=csv_filename,
|
71 |
+
key="csv-download",
|
72 |
+
)
|
73 |
|
74 |
+
pdf = st.download_button(
|
75 |
+
label="Download as PDF",
|
76 |
+
data=df.to_html().encode("utf-8"),
|
77 |
+
file_name=pdf_filename,
|
78 |
+
key="pdf-download",
|
79 |
+
)
|
80 |
|
81 |
|