Saravutw commited on
Commit
3ad4dce
·
verified ·
1 Parent(s): e0e2de3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -48
app.py CHANGED
@@ -1,54 +1,30 @@
1
  import gradio as gr
2
 
3
- html_code = """
4
- <div style="position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; flex-direction: column; z-index: 9999; background-color: #111827;">
5
-
6
- <div style="background-color: #ef4444; height: 45px; display: flex; justify-content: center; align-items: center; border-bottom: 2px solid #b91c1c; flex-shrink: 0;">
7
- <span style="color: white; font-family: sans-serif; font-size: 14px; font-weight: bold; text-align: center; letter-spacing: 0.5px;">
8
- ⚠️ NOTICE: Only Microsoft ID and standard Email logins are supported. Google API login cannot be used directly in this frame.
9
- </span>
10
- </div>
 
 
 
11
 
12
- <div style="flex-grow: 1; width: 100%; position: relative;">
13
- <iframe id="main-iframe" src="https://video.a2e.ai/?coupon=mQo4"
14
- style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; display: block;"
15
- allow="autoplay; encrypted-media; fullscreen"
16
- sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox">
17
- </iframe>
18
- </div>
 
 
 
19
 
20
- </div>
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
- app.launch()
 
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()