Manikandan-Alagu commited on
Commit
02a52e1
·
verified ·
1 Parent(s): 3f1722f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -17,6 +17,25 @@ with open('Response.json', 'r') as file:
17
 
18
  st.title("MCQs Creator Application")
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
 
22
  with st.form("user_inputs"):
@@ -69,24 +88,5 @@ with st.form("user_inputs"):
69
  else:
70
  st.write(response)
71
 
72
- def download(df):
73
- csv_filename = "generated_mcqs.csv"
74
- pdf_filename = "generated_mcqs.pdf"
75
-
76
-
77
-
78
- if button:
79
- st.download_button(label="Download as CSV",
80
- data=df.to_csv(index=False).encode("utf-8"),
81
- file_name=csv_filename,
82
- key="csv-download",
83
- use_container_width=True
84
- )
85
-
86
- st.download_button(label="Download as PDF",
87
- data=df.to_html().encode("utf-8"),
88
- file_name=pdf_filename,
89
- key="pdf-download",
90
- use_container_width=True)
91
 
92
 
 
17
 
18
  st.title("MCQs Creator Application")
19
 
20
+ def download(df):
21
+ csv_filename = "generated_mcqs.csv"
22
+ pdf_filename = "generated_mcqs.pdf"
23
+
24
+
25
+
26
+ if button:
27
+ st.download_button(label="Download as CSV",
28
+ data=df.to_csv(index=False).encode("utf-8"),
29
+ file_name=csv_filename,
30
+ key="csv-download",
31
+ use_container_width=True
32
+ )
33
+
34
+ st.download_button(label="Download as PDF",
35
+ data=df.to_html().encode("utf-8"),
36
+ file_name=pdf_filename,
37
+ key="pdf-download",
38
+ use_container_width=True)
39
 
40
 
41
  with st.form("user_inputs"):
 
88
  else:
89
  st.write(response)
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92