Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,19 +19,19 @@ css = """.hamburger-button {
|
|
| 19 |
|
| 20 |
def upload_file(filepath):
|
| 21 |
name = Path(filepath).name
|
| 22 |
-
return [gr.UploadButton(interactive=False),
|
| 23 |
gr.DownloadButton( value=filepath, interactive=True)] #label=f"Download {name}",
|
| 24 |
|
| 25 |
def download_file():
|
| 26 |
-
return [gr.UploadButton(interactive=True), gr.DownloadButton(interactive=False)]
|
| 27 |
|
| 28 |
with gr.Blocks(css=css, theme=gr.themes.Base(radius_size=gr.themes.sizes.radius_none)) as demo:
|
| 29 |
tb = gr.Textbox(value = "First upload a file and and then you'll be able download it (but only once!)")
|
| 30 |
with gr.Row():
|
| 31 |
with gr.Column(scale=1):
|
| 32 |
-
u = gr.UploadButton(icon='
|
| 33 |
with gr.Column(scale=1):
|
| 34 |
-
d = gr.DownloadButton( icon='
|
| 35 |
with gr.Column(scale=8):
|
| 36 |
t = gr.Textbox(visible=False, )
|
| 37 |
|
|
|
|
| 19 |
|
| 20 |
def upload_file(filepath):
|
| 21 |
name = Path(filepath).name
|
| 22 |
+
return [gr.UploadButton(interactive=False, icon='icon4.png',),
|
| 23 |
gr.DownloadButton( value=filepath, interactive=True)] #label=f"Download {name}",
|
| 24 |
|
| 25 |
def download_file():
|
| 26 |
+
return [gr.UploadButton(interactive=True), gr.DownloadButton(interactive=False, icon='icon1.png',)]
|
| 27 |
|
| 28 |
with gr.Blocks(css=css, theme=gr.themes.Base(radius_size=gr.themes.sizes.radius_none)) as demo:
|
| 29 |
tb = gr.Textbox(value = "First upload a file and and then you'll be able download it (but only once!)")
|
| 30 |
with gr.Row():
|
| 31 |
with gr.Column(scale=1):
|
| 32 |
+
u = gr.UploadButton(icon='icon3.png', elem_classes="hamburger-button", label="", file_count="single", size='lg')
|
| 33 |
with gr.Column(scale=1):
|
| 34 |
+
d = gr.DownloadButton( icon='icon2.png', elem_classes="hamburger-button", label="", interactive=False, size='lg')
|
| 35 |
with gr.Column(scale=8):
|
| 36 |
t = gr.Textbox(visible=False, )
|
| 37 |
|