Spaces:
Running
Running
Test UploadButton 2
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def process_csv_text(temp_file):
|
|
28 |
return df
|
29 |
|
30 |
with gr.Blocks() as demo:
|
31 |
-
upload_button = gr.UploadButton(label="Upload Timetable", file_types = ['.csv'],
|
32 |
table = gr.Dataframe(headers=["Phase", "Activity", "Start date", "End date"], type="pandas", col_count=4, value=process_csv_text(default_csv))
|
33 |
image = gr.Plot()
|
34 |
upload_button.upload(fn=process_csv_text, inputs=upload_button, outputs=table, api_name="upload_csv")
|
|
|
28 |
return df
|
29 |
|
30 |
with gr.Blocks() as demo:
|
31 |
+
upload_button = gr.UploadButton(label="Upload Timetable", file_types = ['.csv'], file_count = "single")
|
32 |
table = gr.Dataframe(headers=["Phase", "Activity", "Start date", "End date"], type="pandas", col_count=4, value=process_csv_text(default_csv))
|
33 |
image = gr.Plot()
|
34 |
upload_button.upload(fn=process_csv_text, inputs=upload_button, outputs=table, api_name="upload_csv")
|