Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
return pipe(text)[0]["translation_text"]
|
9 |
-
|
10 |
-
iface = gr.Interface(
|
11 |
-
fn=predict,
|
12 |
-
inputs='text',
|
13 |
-
outputs='text',
|
14 |
-
examples=[["Hello! My name is Omar"]]
|
15 |
-
)
|
16 |
-
|
17 |
-
iface.launch(inline=False)
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def greet(name):
|
4 |
+
return "Hello " + name + "!"
|
5 |
|
6 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
|
8 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|