blt1 / app.py
aiqcamp's picture
Update app.py
602edaf verified
raw
history blame contribute delete
511 Bytes
import gradio as gr
import os # os ๋ชจ๋“ˆ์„ ์ž„ํฌํŠธํ•ฉ๋‹ˆ๋‹ค.
# ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ํ†ตํ•ด iframe ์†Œ์Šค URL์„ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
iframe_src = os.getenv('iframe_src')
html_code = f"""
<iframe src="{iframe_src}" width="100%" height="600" frameborder="0"></iframe>
"""
def show_iframe():
return html_code
# Gradio ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
iface = gr.Interface(fn=show_iframe, inputs=[], outputs=gr.HTML(), title="AIQ ๋ธ”๋กœ๊ทธ ์ „๋ฌธ๊ฐ€")
# ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
iface.launch()