Woffee commited on
Commit
16c6878
·
1 Parent(s): d86918e

course schedule

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -23,7 +23,7 @@ def read_excel_and_process(fi):
23
  new_data[t][d] = []
24
 
25
  for sheet_name in excel_file.sheet_names:
26
- print(f"Processing sheet: {sheet_name}")
27
 
28
  df = excel_file.parse(sheet_name)
29
 
@@ -54,7 +54,7 @@ def read_excel_and_process(fi):
54
  data_2.append(v)
55
 
56
  df = pd.DataFrame.from_dict(data_2)
57
- df.to_excel(path_or_buf="visualization.xlsx", index=False)
58
  return "visualization.xlsx"
59
 
60
 
@@ -72,19 +72,20 @@ def read_excel_and_process(fi):
72
 
73
  with gr.Blocks() as demo:
74
 
75
- with gr.Tab("Course Schedule Visualization"):
76
- gr.Markdown("### Visualize your course schedule.")
77
 
78
- ex_fi = gr.File(file_count='single')
79
 
80
- result_fi = gr.File(file_count='single')
81
-
82
- # upload to process
83
- ex_fi.upload(read_excel_and_process, inputs=ex_fi, outputs=result_fi)
 
 
84
 
85
- # click to process
86
- # btn_submit = gr.Button("Submit")
87
- # btn_submit.click(text_to_neo4j, inputs=[remarks, columns], outputs=[result_fi,result_ta])/
88
 
89
 
90
  demo.launch()
 
23
  new_data[t][d] = []
24
 
25
  for sheet_name in excel_file.sheet_names:
26
+ # print(f"Processing sheet: {sheet_name}")
27
 
28
  df = excel_file.parse(sheet_name)
29
 
 
54
  data_2.append(v)
55
 
56
  df = pd.DataFrame.from_dict(data_2)
57
+ df.to_excel("visualization.xlsx", index=False)
58
  return "visualization.xlsx"
59
 
60
 
 
72
 
73
  with gr.Blocks() as demo:
74
 
75
+ # with gr.Tab("Course Schedule Visualization"):
 
76
 
77
+ gr.Markdown("## Visualize your course schedule.")
78
 
79
+ ex_fi = gr.File(file_count='single')
80
+
81
+ result_fi = gr.File(file_count='single')
82
+
83
+ # upload to process
84
+ ex_fi.upload(read_excel_and_process, inputs=ex_fi, outputs=result_fi)
85
 
86
+ # click to process
87
+ # btn_submit = gr.Button("Submit")
88
+ # btn_submit.click(text_to_neo4j, inputs=[remarks, columns], outputs=[result_fi,result_ta])/
89
 
90
 
91
  demo.launch()