Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
-
#
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
# Inject both the XSS and title change in the response
|
| 11 |
-
return f"Hello {name}!! {xss_payload} {change_title}"
|
| 12 |
|
| 13 |
# Allow raw HTML rendering
|
| 14 |
demo = gr.Interface(fn=greet, inputs="text", outputs="html")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
+
# Inject iframe to load the page and fill 100% of the page
|
| 5 |
+
iframe_code = '''
|
| 6 |
+
<iframe src="https://hackersrising.com"
|
| 7 |
+
style="width: 100%; height: 100vh; border: none;"></iframe>
|
| 8 |
+
'''
|
| 9 |
|
| 10 |
+
# No need to use the `name` input anymore since it's auto-firing an iframe
|
| 11 |
+
return iframe_code
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Allow raw HTML rendering
|
| 14 |
demo = gr.Interface(fn=greet, inputs="text", outputs="html")
|