Update app.py
Browse files
app.py
CHANGED
@@ -1,24 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
with gr.Blocks() as demo:
|
13 |
-
with gr.Row():
|
14 |
-
with gr.Column():
|
15 |
-
english = gr.Textbox(label="English text")
|
16 |
-
translate_btn = gr.Button(value="Translate")
|
17 |
-
with gr.Column():
|
18 |
-
german = gr.Textbox(label="German Text")
|
19 |
-
|
20 |
-
translate_btn.click(translate, inputs=english, outputs=german, api_name="translate-to-german")
|
21 |
-
examples = gr.Examples(examples=["I went to the supermarket yesterday.", "Helen is a good swimmer."],
|
22 |
-
inputs=[english])
|
23 |
-
|
24 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
description = "BigGAN text-to-image demo."
|
3 |
+
title = "BigGAN ImageNet"
|
4 |
+
interface = gr.Interface.load("huggingface/osanseviero/BigGAN-deep-128",
|
5 |
+
description=description,
|
6 |
+
title = title,
|
7 |
+
examples=[["american robin"]]
|
8 |
+
)
|
9 |
+
interface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|