Spaces:
Runtime error
Runtime error
update layout and accordion desc
Browse files
app.py
CHANGED
@@ -66,9 +66,13 @@ with gr.Blocks(css = """#img_search img {width: 100%; height: 100%; object-fit:
|
|
66 |
<p style="margin-bottom: 10px; font-size: 90%"><br>
|
67 |
▶️Do you see the "view api" link located in the footer of this application?
|
68 |
By clicking on this link, a page will open which provides documentation on the REST API that developers can use to query the Interface function / Block events.<br>
|
69 |
-
▶️In this demo,
|
|
|
|
|
70 |
</p></div>""")
|
71 |
-
|
|
|
|
|
72 |
with gr.Column(): #(elem_id = "col-container"):
|
73 |
b1 = gr.Button("Load More Images").style(full_width=False)
|
74 |
df = gr.Textbox(visible=False,elem_id='dataframe', value=response_dict)
|
@@ -76,9 +80,8 @@ with gr.Blocks(css = """#img_search img {width: 100%; height: 100%; object-fit:
|
|
76 |
img_search = gr.HTML(label = 'Images from PlaygroundAI dataset', elem_id="img_search",
|
77 |
value=initial_imgs ) #initial[:-1] )
|
78 |
|
79 |
-
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/
|
80 |
</p></div>''')
|
81 |
-
gr.HTML(value='<a href="#top">go ot top</a>', elem_id="bottom",)
|
82 |
b1.click(get_next10_images, [df, row_count], [df, row_count, img_search], api_name = "load_playgroundai_images" )
|
83 |
|
84 |
demo.launch(debug=True)
|
|
|
66 |
<p style="margin-bottom: 10px; font-size: 90%"><br>
|
67 |
▶️Do you see the "view api" link located in the footer of this application?
|
68 |
By clicking on this link, a page will open which provides documentation on the REST API that developers can use to query the Interface function / Block events.<br>
|
69 |
+
▶️In this demo, I am making such an API request to the <a href="https://huggingface.co/spaces/ysharma/Playground_AI_Exploration" target="_blank>Playground_AI_Exploration</a>
|
70 |
+
Space.<br>
|
71 |
+
▶️I am exposing an API endpoint of this Gradio app as well. This can easily be done by one line of code, just set the api_name parameter of the event listener.
|
72 |
</p></div>""")
|
73 |
+
|
74 |
+
For more information, visit the API Page guide . To hide the API documentation button and this page, set show_api=False in the Blocks.launch() method.
|
75 |
+
|
76 |
with gr.Column(): #(elem_id = "col-container"):
|
77 |
b1 = gr.Button("Load More Images").style(full_width=False)
|
78 |
df = gr.Textbox(visible=False,elem_id='dataframe', value=response_dict)
|
|
|
80 |
img_search = gr.HTML(label = 'Images from PlaygroundAI dataset', elem_id="img_search",
|
81 |
value=initial_imgs ) #initial[:-1] )
|
82 |
|
83 |
+
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/Stream_PlaygroundAI_Images?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a></center>
|
84 |
</p></div>''')
|
|
|
85 |
b1.click(get_next10_images, [df, row_count], [df, row_count, img_search], api_name = "load_playgroundai_images" )
|
86 |
|
87 |
demo.launch(debug=True)
|