ysharma HF Staff commited on
Commit
de47419
·
verified ·
1 Parent(s): 4d6a27b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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='icon4.png', elem_classes="hamburger-button", label="", file_count="single", size='lg')
33
  with gr.Column(scale=1):
34
- d = gr.DownloadButton( icon='icon1.png', elem_classes="hamburger-button", label="", interactive=False, size='lg')
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