Spaces:
Runtime error
Runtime error
testing html embed
Browse files
app.py
CHANGED
|
@@ -40,12 +40,11 @@ def get_image_data():
|
|
| 40 |
def segmentation_generation(image_name, c_width, n_top, n_gif_imgs):
|
| 41 |
print("GRADIO INPUTS:", image_name, c_width, n_top, n_gif_imgs)
|
| 42 |
|
| 43 |
-
html =
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
return html
|
| 49 |
return html
|
| 50 |
|
| 51 |
cred_width = c_width
|
|
@@ -96,7 +95,7 @@ if __name__ == "__main__":
|
|
| 96 |
# gradio's image inputs look like this: <PIL.Image.Image image mode=RGB size=305x266 at 0x7F3D01C91FA0>
|
| 97 |
# need to learn how to handle image inputs, or deal with file inputs or just file path strings
|
| 98 |
inp = gr.inputs.Textbox(lines=1, placeholder="Insert file path here", default="", label="Input Image Path", optional=False)
|
| 99 |
-
out =
|
| 100 |
|
| 101 |
iface = gr.Interface(
|
| 102 |
segmentation_generation,
|
|
|
|
| 40 |
def segmentation_generation(image_name, c_width, n_top, n_gif_imgs):
|
| 41 |
print("GRADIO INPUTS:", image_name, c_width, n_top, n_gif_imgs)
|
| 42 |
|
| 43 |
+
html = '''
|
| 44 |
+
<video width="500px" height="500px" controls="controls"/>
|
| 45 |
+
<source src="./diego_mp4.mp4" type="video/mp4">
|
| 46 |
+
</video> >
|
| 47 |
+
'''
|
|
|
|
| 48 |
return html
|
| 49 |
|
| 50 |
cred_width = c_width
|
|
|
|
| 95 |
# gradio's image inputs look like this: <PIL.Image.Image image mode=RGB size=305x266 at 0x7F3D01C91FA0>
|
| 96 |
# need to learn how to handle image inputs, or deal with file inputs or just file path strings
|
| 97 |
inp = gr.inputs.Textbox(lines=1, placeholder="Insert file path here", default="", label="Input Image Path", optional=False)
|
| 98 |
+
out = gr.outputs.HTML(label="Output Video")
|
| 99 |
|
| 100 |
iface = gr.Interface(
|
| 101 |
segmentation_generation,
|