Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -231,6 +231,9 @@ def ์ฌ์ฃผ_๋ถ์(๋
์ฃผ, ์์ฃผ, ์ผ์ฃผ, ์์ฃผ):
|
|
231 |
return html_result
|
232 |
|
233 |
|
|
|
|
|
|
|
234 |
with gr.Blocks() as demo:
|
235 |
with gr.Tab("AI ์ฌ์ฃผ ์ด์ธ ๋ถ์"):
|
236 |
solYear = gr.Textbox(label="์๋
(์: 1990)")
|
@@ -251,13 +254,15 @@ with gr.Blocks() as demo:
|
|
251 |
with gr.Tab("๋์ ์ฑ๊ฒฉ๊ณผ ํน์ง ๋ถ์"):
|
252 |
OPENAI_API_KEY_input = gr.Textbox(label="OpenAI API ํค", placeholder="์ฌ๊ธฐ์ OpenAI API ํค๋ฅผ ์
๋ ฅํ์ธ์")
|
253 |
character_output = gr.Textbox(label="์ฑ๊ฒฉ๊ณผ ํน์ง")
|
|
|
|
|
|
|
|
|
254 |
analyze_button = gr.Button("๋ถ์ํ๊ธฐ")
|
255 |
analyze_button.click(fn=analyze_character, inputs=[lunIljin_state, OPENAI_API_KEY_input], outputs=character_output)
|
|
|
|
|
256 |
|
257 |
-
|
258 |
-
with gr.Tab("์ ๋ช
์ธ"):
|
259 |
-
celebrity_input = gr.Textbox(label="์ ๋ช
์ธ ์ด๋ฆ", placeholder="์ฌ๊ธฐ์ ์ ๋ช
์ธ์ ์ด๋ฆ์ ์
๋ ฅํ์ธ์")
|
260 |
-
celebrity_output = gr.HTML() # ์ ๋ช
์ธ ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ ์ถ๋ ฅํ HTML ์ปดํฌ๋ํธ
|
261 |
|
262 |
|
263 |
demo.launch()
|
|
|
231 |
return html_result
|
232 |
|
233 |
|
234 |
+
def analyze_character(lunIljin_state, OPENAI_API_KEY):
|
235 |
+
# ์ฌ๊ธฐ์ ์ฑ๊ฒฉ๊ณผ ํน์ง์ ๋ถ์ํ๋ ํจ์์ ๋ด์ฉ์ ๊ตฌํํ์ธ์.
|
236 |
+
pass
|
237 |
with gr.Blocks() as demo:
|
238 |
with gr.Tab("AI ์ฌ์ฃผ ์ด์ธ ๋ถ์"):
|
239 |
solYear = gr.Textbox(label="์๋
(์: 1990)")
|
|
|
254 |
with gr.Tab("๋์ ์ฑ๊ฒฉ๊ณผ ํน์ง ๋ถ์"):
|
255 |
OPENAI_API_KEY_input = gr.Textbox(label="OpenAI API ํค", placeholder="์ฌ๊ธฐ์ OpenAI API ํค๋ฅผ ์
๋ ฅํ์ธ์")
|
256 |
character_output = gr.Textbox(label="์ฑ๊ฒฉ๊ณผ ํน์ง")
|
257 |
+
|
258 |
+
celebrity_input = gr.Textbox(label="์ ๋ช
์ธ ์ด๋ฆ")
|
259 |
+
celebrity_output = gr.HTML() # ์ ๋ช
์ธ ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ ์ถ๋ ฅํ HTML ์ปดํฌ๋ํธ
|
260 |
+
|
261 |
analyze_button = gr.Button("๋ถ์ํ๊ธฐ")
|
262 |
analyze_button.click(fn=analyze_character, inputs=[lunIljin_state, OPENAI_API_KEY_input], outputs=character_output)
|
263 |
+
|
264 |
+
# ์ ๋ช
์ธ ๋ถ์์ ๊ฐ์ ํญ์ ์ถ๊ฐ
|
265 |
|
|
|
|
|
|
|
|
|
266 |
|
267 |
|
268 |
demo.launch()
|