Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,6 +76,7 @@ def get_dropdown_options(file_path, column_name):
|
|
76 |
df = pd.read_excel(file_path)
|
77 |
# Extract the unique values from the specified column
|
78 |
options = df["Name"].dropna().unique().tolist()
|
|
|
79 |
return options
|
80 |
|
81 |
|
@@ -89,12 +90,12 @@ with gr.Blocks() as app:
|
|
89 |
column_name = "Name"
|
90 |
options = get_dropdown_options(file_path, column_name)
|
91 |
name = gr.Dropdown(choices=options, label="Select an Option", show_label=True)
|
92 |
-
output = gr.Textbox(label="You Selected")
|
93 |
|
94 |
-
def show_selection(choice):
|
95 |
-
|
96 |
|
97 |
-
name.change(show_selection, inputs=[name], outputs=[output])
|
98 |
|
99 |
day = gr.Textbox(label="Day")
|
100 |
date = gr.Textbox(label="Date (YYYY-MM-DD)")
|
|
|
76 |
df = pd.read_excel(file_path)
|
77 |
# Extract the unique values from the specified column
|
78 |
options = df["Name"].dropna().unique().tolist()
|
79 |
+
options.sort()
|
80 |
return options
|
81 |
|
82 |
|
|
|
90 |
column_name = "Name"
|
91 |
options = get_dropdown_options(file_path, column_name)
|
92 |
name = gr.Dropdown(choices=options, label="Select an Option", show_label=True)
|
93 |
+
# output = gr.Textbox(label="You Selected")
|
94 |
|
95 |
+
# def show_selection(choice):
|
96 |
+
# return f"You selected: {choice}"
|
97 |
|
98 |
+
# name.change(show_selection, inputs=[name], outputs=[output])
|
99 |
|
100 |
day = gr.Textbox(label="Day")
|
101 |
date = gr.Textbox(label="Date (YYYY-MM-DD)")
|