Spaces:
Runtime error
Runtime error
mejor UI4
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: telecom_object_detection.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
-
__all__ = ['title', 'css', 'urls']
|
5 |
|
6 |
# %% telecom_object_detection.ipynb 2
|
7 |
import gradio as gr
|
@@ -22,6 +22,9 @@ import gradio as gr
|
|
22 |
|
23 |
urls = ["https://c8.alamy.com/comp/J2AB4K/the-new-york-stock-exchange-on-the-wall-street-in-new-york-J2AB4K.jpg"]
|
24 |
|
|
|
|
|
|
|
25 |
with gr.Blocks(css=css) as demo:
|
26 |
|
27 |
gr.Markdown(title)
|
@@ -50,10 +53,10 @@ with gr.Blocks(css=css) as demo:
|
|
50 |
|
51 |
with gr.Row():
|
52 |
example_url = gr.Dataset(components=[url_input], samples=[[str(url)] for url in urls])
|
53 |
-
|
54 |
|
55 |
|
56 |
-
|
57 |
-
|
58 |
|
59 |
demo.launch()
|
|
|
1 |
# AUTOGENERATED! DO NOT EDIT! File to edit: telecom_object_detection.ipynb.
|
2 |
|
3 |
# %% auto 0
|
4 |
+
__all__ = ['title', 'css', 'urls', 'flip_text', 'flip_image']
|
5 |
|
6 |
# %% telecom_object_detection.ipynb 2
|
7 |
import gradio as gr
|
|
|
22 |
|
23 |
urls = ["https://c8.alamy.com/comp/J2AB4K/the-new-york-stock-exchange-on-the-wall-street-in-new-york-J2AB4K.jpg"]
|
24 |
|
25 |
+
def flip_text(): pass
|
26 |
+
def flip_image(): pass
|
27 |
+
|
28 |
with gr.Blocks(css=css) as demo:
|
29 |
|
30 |
gr.Markdown(title)
|
|
|
53 |
|
54 |
with gr.Row():
|
55 |
example_url = gr.Dataset(components=[url_input], samples=[[str(url)] for url in urls])
|
56 |
+
url_button = gr.Button("Detect")
|
57 |
|
58 |
|
59 |
+
url_button.click(flip_text, inputs=url_input, outputs=img_output_from_url)
|
60 |
+
image_button.click(flip_image, inputs=image_input, outputs=image_output)
|
61 |
|
62 |
demo.launch()
|