File size: 511 Bytes
04565a5
602edaf
04565a5
602edaf
 
 
 
 
04565a5
 
 
 
 
 
 
 
 
602edaf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()