Update app.py
Browse files
app.py
CHANGED
|
@@ -1,54 +1,30 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
""
|
| 22 |
-
|
| 23 |
-
custom_css = """
|
| 24 |
-
/* Aggressively hide Gradio's default UI elements that cause stretching */
|
| 25 |
-
footer {display: none !important;}
|
| 26 |
-
body, html {
|
| 27 |
-
margin: 0 !important;
|
| 28 |
-
padding: 0 !important;
|
| 29 |
-
overflow: hidden !important;
|
| 30 |
-
}
|
| 31 |
-
.gradio-container {
|
| 32 |
-
padding: 0px !important;
|
| 33 |
-
margin: 0px !important;
|
| 34 |
-
max-width: 100% !important;
|
| 35 |
-
width: 100% !important;
|
| 36 |
-
height: 100vh !important;
|
| 37 |
-
overflow: hidden !important;
|
| 38 |
-
border: none !important;
|
| 39 |
-
}
|
| 40 |
-
#component-0, .contain, .wrap {
|
| 41 |
-
padding: 0 !important;
|
| 42 |
-
margin: 0 !important;
|
| 43 |
-
border: none !important;
|
| 44 |
-
box-shadow: none !important;
|
| 45 |
-
height: 100vh !important;
|
| 46 |
-
overflow: hidden !important;
|
| 47 |
-
}
|
| 48 |
-
"""
|
| 49 |
-
|
| 50 |
-
with gr.Blocks(title="A2E Hub", css=custom_css) as app:
|
| 51 |
-
gr.HTML(html_code)
|
| 52 |
|
| 53 |
if __name__ == "__main__":
|
| 54 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def create_iframe(url):
|
| 4 |
+
return f"""
|
| 5 |
+
<iframe
|
| 6 |
+
src="{url}"
|
| 7 |
+
width="100%"
|
| 8 |
+
height="1000px"
|
| 9 |
+
style="border: none;"
|
| 10 |
+
allow="accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr; wake-lock; xr-spatial-tracking"
|
| 11 |
+
sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads">
|
| 12 |
+
</iframe>
|
| 13 |
+
"""
|
| 14 |
|
| 15 |
+
with gr.Blocks(fill_height=True) as demo:
|
| 16 |
+
with gr.Tabs():
|
| 17 |
+
with gr.Tab("FireRed 1.0 (macgaga)"):
|
| 18 |
+
gr.HTML(create_iframe("https://macgaga-firered-image-edit-1-0-fast.hf.space"))
|
| 19 |
+
|
| 20 |
+
with gr.Tab("FireRed 1.0 (Svngoku)"):
|
| 21 |
+
gr.HTML(create_iframe("https://svngoku-firered-image-edit-1-0-fast.hf.space"))
|
| 22 |
+
|
| 23 |
+
with gr.Tab("FireRed 1.1 (WarlordHermes)"):
|
| 24 |
+
gr.HTML(create_iframe("https://warlordhermes-firered-image-edit-1-1-fast.hf.space"))
|
| 25 |
|
| 26 |
+
with gr.Tab("Bianji (fdsgsfjsfg)"):
|
| 27 |
+
gr.HTML(create_iframe("https://fdsgsfjsfg-bianji.hf.space"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
+
demo.launch()
|