Narsil HF staff commited on
Commit
be9d28f
1 Parent(s): 48e86e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -2
app.py CHANGED
@@ -60,6 +60,25 @@ Slow : {taken_slow}
60
  Fast : {taken_fast}
61
  """
62
 
 
63
 
64
- iface = gr.Interface(fn=download, inputs="text", outputs="text")
65
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  Fast : {taken_fast}
61
  """
62
 
63
+ examples = ["gpt2", "openai/whisper-large-v2"]
64
 
65
+ with gr.Blocks() as demo:
66
+ with gr.Row():
67
+ with gr.Column():
68
+ inputs = gr.Textbox(
69
+ label="Repo id",
70
+ value="gpt2", # should be set to " " when plugged into a real API
71
+ )
72
+ submit = gr.Button("Submit")
73
+ with gr.Column():
74
+ outputs = gr.Textbox(
75
+ label="Download speeds",
76
+ )
77
+ with gr.Row():
78
+ gr.Examples(examples=examples, inputs=[inputs])
79
+ submit.click(
80
+ download,
81
+ inputs=[inputs],
82
+ outputs=[outputs],
83
+ )
84
+ demo.launch()