Manikandan-Alagu commited on
Commit
902a2ad
·
verified ·
1 Parent(s): b31255a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -17,7 +17,11 @@ with open('Response.json', 'r') as file:
17
 
18
  st.title("MCQs Creator Application")
19
 
20
- def download(df):
 
 
 
 
21
  col1, col2 = st.columns(2)
22
 
23
  if button:
@@ -75,7 +79,7 @@ with st.form("user_inputs"):
75
  if table_data is not None:
76
  df = pd.DataFrame(table_data)
77
  df.index = df.index + 1
78
- download(df)
79
  st.table(df)
80
  # Display the review in a text box as well
81
  st.text_area(label="Review", value=response["review"])
@@ -84,3 +88,5 @@ with st.form("user_inputs"):
84
  st.error("Error in the table data")
85
  else:
86
  st.write(response)
 
 
 
17
 
18
  st.title("MCQs Creator Application")
19
 
20
+ def fetch(df):
21
+ return df
22
+
23
+ def download():
24
+ df = fetch(df)
25
  col1, col2 = st.columns(2)
26
 
27
  if button:
 
79
  if table_data is not None:
80
  df = pd.DataFrame(table_data)
81
  df.index = df.index + 1
82
+ fetch(df)
83
  st.table(df)
84
  # Display the review in a text box as well
85
  st.text_area(label="Review", value=response["review"])
 
88
  st.error("Error in the table data")
89
  else:
90
  st.write(response)
91
+
92
+ download()