kim368882 commited on
Commit
74bdad8
ยท
verified ยท
1 Parent(s): 75151e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
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()