Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,42 +14,13 @@ with gr.Blocks() as demo:
|
|
| 14 |
|
| 15 |
**Our Generative AI Playground includes:**
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
| 21 |
|
| 22 |
"""
|
| 23 |
)
|
| 24 |
-
|
| 25 |
-
with gr.Row():
|
| 26 |
-
roop_button = gr.Button("Try ROOP Deepfake")
|
| 27 |
-
text_to_image_button = gr.Button("Try Text to Image")
|
| 28 |
-
vr_button = gr.Button("Try AI for VR 101 Research")
|
| 29 |
-
cloth_button = gr.Button("Try Cloth Segmentation Inpainting")
|
| 30 |
-
|
| 31 |
-
# Hidden Textbox to store the URL
|
| 32 |
-
url_textbox = gr.Textbox(visible=False)
|
| 33 |
-
|
| 34 |
-
# Set of URLs you want to redirect to
|
| 35 |
-
urls = {
|
| 36 |
-
"roop_button": "https://huggingface.co/spaces/banyapon/roop",
|
| 37 |
-
"text_to_image_button": "https://huggingface.co/spaces/banyapon/Realistic-Image-Generator-Model",
|
| 38 |
-
"vr_button": "https://huggingface.co/spaces/banyapon/Pana360gen",
|
| 39 |
-
"cloth_button": "https://huggingface.co/spaces/banyapon/InpaintCloth"
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
# Function to redirect the URL
|
| 43 |
-
def redirect(button_name):
|
| 44 |
-
return gr.update(value=urls[button_name])
|
| 45 |
-
|
| 46 |
-
# Function to perform the redirection
|
| 47 |
-
js_redirect = "(url) => {window.location.href = url; return []}"
|
| 48 |
-
|
| 49 |
-
# Add on_click events to the buttons
|
| 50 |
-
roop_button.click(redirect, inputs=[gr.Textbox(value="roop_button", visible=False)], outputs=[url_textbox], _js=js_redirect)
|
| 51 |
-
text_to_image_button.click(redirect, inputs=[gr.Textbox(value="text_to_image_button", visible=False)], outputs=[url_textbox], _js=js_redirect)
|
| 52 |
-
vr_button.click(redirect, inputs=[gr.Textbox(value="vr_button", visible=False)], outputs=[url_textbox], _js=js_redirect)
|
| 53 |
-
cloth_button.click(redirect, inputs=[gr.Textbox(value="cloth_button", visible=False)], outputs=[url_textbox], _js=js_redirect)
|
| 54 |
-
|
| 55 |
demo.launch()
|
|
|
|
| 14 |
|
| 15 |
**Our Generative AI Playground includes:**
|
| 16 |
|
| 17 |
+
<h2>Our Generative AI Playground includes:</h2>
|
| 18 |
+
|
| 19 |
+
1. <a href="https://huggingface.co/spaces/banyapon/roop" target="_blank" style="text-decoration: none; color: blue;"><b>ROOP Deepfake:</b></a> Swap faces in videos using a single reference image, perfect for creating virtual influencers.
|
| 20 |
+
2. <a href="https://huggingface.co/spaces/banyapon/Realistic-Image-Generator-Model" target="_blank" style="text-decoration: none; color: blue;"><b>Text to Image:</b></a> Design prompts to generate images with the RealVis diffusion model.
|
| 21 |
+
3. <a href="https://huggingface.co/spaces/banyapon/Pana360gen" target="_blank" style="text-decoration: none; color: blue;"><b>Text to 360 Panorama Image:</b></a> Create immersive 360 VR experiences with Generative AI, as showcased at MHESI Fair 2024's "AI for VR 101" topic.
|
| 22 |
+
4. <a href="https://huggingface.co/spaces/banyapon/InpaintCloth" target="_blank" style="text-decoration: none; color: blue;"><b>Cloth Segmentation and Inpainting:</b></a> Extract clothing from images and design new outfits using text prompts.
|
| 23 |
|
| 24 |
"""
|
| 25 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
demo.launch()
|