Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
# CSS ์คํ์ผ ์ ์
|
| 4 |
css_style = """
|
|
@@ -44,24 +45,19 @@ iframe {
|
|
| 44 |
}
|
| 45 |
"""
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
if "์ฝ๋" in input_text:
|
| 50 |
-
return f"""<div class="code-result">{input_text}
|
| 51 |
-
<button class="copy-button" data-text="{input_text}" onclick="navigator.clipboard.writeText(this.getAttribute('data-text'));">Copy</button>
|
| 52 |
-
</div>"""
|
| 53 |
-
else:
|
| 54 |
-
return input_text
|
| 55 |
|
| 56 |
def app():
|
| 57 |
with gr.Blocks(css=css_style) as demo:
|
| 58 |
-
gr.Markdown("#
|
| 59 |
with gr.Row():
|
| 60 |
-
|
|
|
|
| 61 |
|
| 62 |
# ์
๋ ฅ ํ๋์ ๊ฒฐ๊ณผ ์ถ๋ ฅ ์ค์
|
| 63 |
input_text = gr.Textbox(label="์ฌ๊ธฐ์ ์ฝ๋๋ฅผ ์
๋ ฅํ์ธ์")
|
| 64 |
-
result = gr.HTML()
|
| 65 |
input_text.change(fn=process_result, inputs=input_text, outputs=result)
|
| 66 |
|
| 67 |
return demo
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import os
|
| 3 |
|
| 4 |
# CSS ์คํ์ผ ์ ์
|
| 5 |
css_style = """
|
|
|
|
| 45 |
}
|
| 46 |
"""
|
| 47 |
|
| 48 |
+
# ํ๊ฒฝ ๋ณ์์์ URL ๋ถ๋ฌ์ค๊ธฐ
|
| 49 |
+
cburl = os.getenv("CBURL", "default_url_if_not_set")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
def app():
|
| 52 |
with gr.Blocks(css=css_style) as demo:
|
| 53 |
+
gr.Markdown("# AIQ Codepilot", elem_id="main-title")
|
| 54 |
with gr.Row():
|
| 55 |
+
# ๋น๋ฐ URL ์ฌ์ฉ
|
| 56 |
+
gr.HTML(value=f'<iframe src="{cburl}"></iframe>')
|
| 57 |
|
| 58 |
# ์
๋ ฅ ํ๋์ ๊ฒฐ๊ณผ ์ถ๋ ฅ ์ค์
|
| 59 |
input_text = gr.Textbox(label="์ฌ๊ธฐ์ ์ฝ๋๋ฅผ ์
๋ ฅํ์ธ์")
|
| 60 |
+
result = gr.HTML()
|
| 61 |
input_text.change(fn=process_result, inputs=input_text, outputs=result)
|
| 62 |
|
| 63 |
return demo
|