Amirizaniani commited on
Commit
918c233
·
verified ·
1 Parent(s): 202c24f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -152,15 +152,15 @@ def process_inputs(llm, file, relevance, diversity):
152
  if df.shape[1] != 1:
153
  return "The uploaded file must contain only one column of questions.", None
154
 
155
- questions_list = df.iloc[:, 0].tolist()
 
 
 
 
 
156
  else:
157
  return "No questions provided.", None
158
 
159
- # Save questions to a new Excel file
160
- output_df = pd.DataFrame(questions_list, columns=["Questions"])
161
- output_file = "processed_questions.xlsx"
162
- output_df.to_excel(output_file, index=False)
163
-
164
  return "Processing complete. Download the file below.", output_file
165
 
166
 
 
152
  if df.shape[1] != 1:
153
  return "The uploaded file must contain only one column of questions.", None
154
 
155
+ # Extract the first column
156
+ questions_list = df.iloc[:, 0]
157
+
158
+ # Save the first column to a new Excel file
159
+ output_file = "processed_questions.xlsx"
160
+ questions_list.to_frame().to_excel(output_file, index=False, header=["Questions"])
161
  else:
162
  return "No questions provided.", None
163
 
 
 
 
 
 
164
  return "Processing complete. Download the file below.", output_file
165
 
166