mdj1412 commited on
Commit
6ddfa3e
โ€ข
1 Parent(s): 213ce70

Update app.py solve clear

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -165,6 +165,9 @@ demo = gr.Interface(builder, inputs=[gr.inputs.Dropdown(['Default', 'Eng', 'Kor'
165
  # outputs='label',
166
  title=title, description=description, examples=examples)
167
 
 
 
 
168
  with gr.Blocks() as demo1:
169
  gr.Markdown(
170
  """
@@ -177,7 +180,7 @@ with gr.Blocks() as demo1:
177
  gr.Markdown(
178
  """
179
  ๋‚ด์šฉ์€ ์•„์ง ๋ฐ”๊พธ์ง€ ์•Š์•˜์Œ (ํ˜•์‹๋งŒ ์ฐธ๊ณ )
180
- ๋ฌธ์ œ์  : ํด๋ฆฌ์–ด ํด๋ฆญ์ด ์›ํ•˜๋Š”๋Œ€๋กœ ์•ˆ๋จ
181
  It is a program that classifies whether it is positive or negative by entering movie reviews. \
182
  You can choose between the Korean version and the English version. \
183
  It also provides a version called ""Default"", which determines whether it is Korean or English and predicts it.
@@ -186,8 +189,8 @@ with gr.Blocks() as demo1:
186
 
187
  with gr.Row():
188
  with gr.Column():
189
- inputs_1 = gr.inputs.Dropdown(['Default', 'Eng', 'Kor'])
190
- inputs_2 = gr.Textbox(placeholder="๋ฆฌ๋ทฐ๋ฅผ ์ž…๋ ฅํ•˜์‹œ์˜ค.")
191
  with gr.Row():
192
  btn2 = gr.Button("ํด๋ฆฌ์–ด")
193
  btn = gr.Button("์ œ์ถœํ•˜๊ธฐ")
@@ -197,6 +200,7 @@ with gr.Blocks() as demo1:
197
  output_3 = gr.HighlightedText(label="Analysis", combine_adjacent=False) \
198
  .style(color_map={"+++": "#CF0000", "++": "#FF3232", "+": "#FFD4D4", "---": "#0004FE", "--": "#4C47FF", "-": "#BEBDFF"})
199
 
 
200
  btn.click(fn=builder, inputs=[inputs_1, inputs_2], outputs=[output_1, output_2, output_3])
201
  gr.Examples(examples, inputs=[inputs_1, inputs_2])
202
 
 
165
  # outputs='label',
166
  title=title, description=description, examples=examples)
167
 
168
+ def fn2():
169
+ demo1.launch()
170
+
171
  with gr.Blocks() as demo1:
172
  gr.Markdown(
173
  """
 
180
  gr.Markdown(
181
  """
182
  ๋‚ด์šฉ์€ ์•„์ง ๋ฐ”๊พธ์ง€ ์•Š์•˜์Œ (ํ˜•์‹๋งŒ ์ฐธ๊ณ )
183
+ ๋ฌธ์ œ์  : ํด๋ฆฌ์–ด ํด๋ฆญ์ด ์›ํ•˜๋Š”๋Œ€๋กœ ์•ˆ๋จ
184
  It is a program that classifies whether it is positive or negative by entering movie reviews. \
185
  You can choose between the Korean version and the English version. \
186
  It also provides a version called ""Default"", which determines whether it is Korean or English and predicts it.
 
189
 
190
  with gr.Row():
191
  with gr.Column():
192
+ inputs_1 = gr.inputs.Dropdown(['Default', 'Eng', 'Kor'], label='Lang')
193
+ inputs_2 = gr.Textbox(placeholder="๋ฆฌ๋ทฐ๋ฅผ ์ž…๋ ฅํ•˜์‹œ์˜ค.", label='Text')
194
  with gr.Row():
195
  btn2 = gr.Button("ํด๋ฆฌ์–ด")
196
  btn = gr.Button("์ œ์ถœํ•˜๊ธฐ")
 
200
  output_3 = gr.HighlightedText(label="Analysis", combine_adjacent=False) \
201
  .style(color_map={"+++": "#CF0000", "++": "#FF3232", "+": "#FFD4D4", "---": "#0004FE", "--": "#4C47FF", "-": "#BEBDFF"})
202
 
203
+ btn2.click(fn=fn2)
204
  btn.click(fn=builder, inputs=[inputs_1, inputs_2], outputs=[output_1, output_2, output_3])
205
  gr.Examples(examples, inputs=[inputs_1, inputs_2])
206