Enric Perpinyà Pitarch commited on
Commit ·
b9f5b92
1
Parent(s): 52d7da5
Add app.py with greet function and Gradio interface
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
# transcriber = pipeline("automatic-speech-recognition", model="ID2223/hackernews_upvotes_predictor")
|
| 5 |
+
|
| 6 |
+
def greet(name):
|
| 7 |
+
return "Hello " + name + "!!"
|
| 8 |
+
|
| 9 |
+
with gr.Blocks(
|
| 10 |
+
theme=gr.themes.Default(font=[gr.themes.GoogleFont("IBM Plex Mono"), "Arial", "sans-serif"])
|
| 11 |
+
) as demo:
|
| 12 |
+
gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 13 |
+
|
| 14 |
+
demo.launch()
|