Spaces:
Runtime error
Runtime error
anagri commited on
Commit ·
eb6849f
1
Parent(s): e686858
[Amir] creating demo space
Browse files- app.py +19 -0
- requirements.txt +2 -0
- sample.jpg +0 -0
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from PIL import Image
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
def greet(name, place):
|
| 6 |
+
return Image.open('sample.jpg')
|
| 7 |
+
|
| 8 |
+
iface = gr.Interface(
|
| 9 |
+
title="Dialogue Box",
|
| 10 |
+
description="upload a comic and enter a dialogue",
|
| 11 |
+
fn=greet,
|
| 12 |
+
inputs=[
|
| 13 |
+
gr.Textbox(placeholder="in 1", value="in 1"),
|
| 14 |
+
gr.Textbox(placeholder="in 2", value="in 2"),
|
| 15 |
+
],
|
| 16 |
+
outputs=gr.Image()
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
iface.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Pillow
|
| 2 |
+
numpy
|
sample.jpg
ADDED
|