Update app_iframe.py
Browse files- app_iframe.py +27 -5
app_iframe.py
CHANGED
|
@@ -1,15 +1,37 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
html_content = """
|
| 4 |
<iframe
|
| 5 |
src="https://llmarena.ru/?leaderboard"
|
| 6 |
-
|
| 7 |
-
height="800px"
|
| 8 |
-
style="border: none;"
|
| 9 |
></iframe>
|
| 10 |
"""
|
| 11 |
|
| 12 |
-
with gr.Blocks() as demo:
|
| 13 |
gr.HTML(html_content)
|
| 14 |
|
| 15 |
-
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
# CSS для скрытия footer и максимизации размера
|
| 4 |
+
custom_css = """
|
| 5 |
+
footer {
|
| 6 |
+
display: none !important;
|
| 7 |
+
}
|
| 8 |
+
.gradio-container {
|
| 9 |
+
max-width: 100% !important;
|
| 10 |
+
padding: 0 !important;
|
| 11 |
+
margin: 0 !important;
|
| 12 |
+
}
|
| 13 |
+
.container {
|
| 14 |
+
max-width: 100% !important;
|
| 15 |
+
padding: 0 !important;
|
| 16 |
+
margin: 0 !important;
|
| 17 |
+
}
|
| 18 |
+
iframe {
|
| 19 |
+
width: 100vw !important;
|
| 20 |
+
height: 100vh !important;
|
| 21 |
+
position: fixed !important;
|
| 22 |
+
top: 0 !important;
|
| 23 |
+
left: 0 !important;
|
| 24 |
+
}
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
html_content = """
|
| 28 |
<iframe
|
| 29 |
src="https://llmarena.ru/?leaderboard"
|
| 30 |
+
style="width: 100vw; height: 100vh; border: none;"
|
|
|
|
|
|
|
| 31 |
></iframe>
|
| 32 |
"""
|
| 33 |
|
| 34 |
+
with gr.Blocks(css=custom_css) as demo:
|
| 35 |
gr.HTML(html_content)
|
| 36 |
|
| 37 |
+
demo.launch(show_api=False)
|