arxivgpt kim commited on
Commit
baee071
Β·
verified Β·
1 Parent(s): 2c47d01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -9
app.py CHANGED
@@ -63,25 +63,30 @@ def predict(inputs):
63
  return f"<div style='color: red;'>였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. μƒνƒœ μ½”λ“œ: {response.status_code}</div>"
64
 
65
 
 
66
  css = """
67
  footer {
68
  visibility: hidden;
69
  }
70
  """
71
 
72
- with gr.Blocks(css=css) as demo:
73
- gr.Markdown("AIQ Codepilot")
74
- gr.Markdown("AI μžλ™ ν”„λ‘œκ·Έλž˜λ° μ„œλΉ„μŠ€")
75
- gr.Markdown("Powred by Huggingface, Gradio, OpenAI, Python")
76
- text_input = gr.Textbox(label="λ©”μ‹œμ§€λ₯Ό μž…λ ₯ν•˜μ„Έμš”...")
77
- submit_button = gr.Button("전솑")
78
- output_text = gr.Textbox(label="AI 응닡")
 
 
79
 
80
  submit_button.click(
81
  fn=predict,
82
  inputs=text_input,
83
- outputs=output_text
84
  )
85
 
86
  # μΈν„°νŽ˜μ΄μŠ€ μ‹€ν–‰
87
- demo.launch()
 
 
 
63
  return f"<div style='color: red;'>였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. μƒνƒœ μ½”λ“œ: {response.status_code}</div>"
64
 
65
 
66
+
67
  css = """
68
  footer {
69
  visibility: hidden;
70
  }
71
  """
72
 
73
+
74
+
75
+ # gr.Blocksλ₯Ό μ‚¬μš©ν•˜μ—¬ λ ˆμ΄μ•„μ›ƒμ„ κ΅¬μ„±ν•©λ‹ˆλ‹€.
76
+ with gr.Blocks() as demo:
77
+ with gr.Row():
78
+ text_input = gr.Textbox(label="λ©”μ‹œμ§€λ₯Ό μž…λ ₯ν•˜μ„Έμš”...", placeholder="여기에 μž…λ ₯ν•˜μ„Έμš”...")
79
+ with gr.Row():
80
+ submit_button = gr.Button("전솑")
81
+ output_html = gr.HTML(label="AI 응닡")
82
 
83
  submit_button.click(
84
  fn=predict,
85
  inputs=text_input,
86
+ outputs=output_html
87
  )
88
 
89
  # μΈν„°νŽ˜μ΄μŠ€ μ‹€ν–‰
90
+ demo.launch()
91
+
92
+