roncc13 commited on
Commit
45963e1
·
verified ·
1 Parent(s): 445b63a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -276,7 +276,7 @@ textarea {
276
  }
277
  """
278
 
279
- with gr.Blocks(css=custom_css, fill_height=True, theme=gr.themes.Soft()) as demo:
280
  # Top bar
281
  with gr.Row(elem_id="top-nav"):
282
  with gr.Column(scale=3, elem_id="top-nav-left"):
@@ -396,7 +396,6 @@ with gr.Blocks(css=custom_css, fill_height=True, theme=gr.themes.Soft()) as demo
396
  )
397
 
398
  # Wiring function to UI (update label, confidence, bars, explanations)
399
- # Wiring function to UI (update label, confidence, bars, explanations)
400
  def update_ui(text):
401
  label, score, _, phrases, explanation, tags = classify(text)
402
  score_pct = int(score * 100)
@@ -456,4 +455,10 @@ with gr.Blocks(css=custom_css, fill_height=True, theme=gr.themes.Soft()) as demo
456
  inputs=None,
457
  outputs=input_text,
458
  )
 
 
 
 
 
 
459
 
 
276
  }
277
  """
278
 
279
+ with gr.Blocks(fill_height=True) as demo:
280
  # Top bar
281
  with gr.Row(elem_id="top-nav"):
282
  with gr.Column(scale=3, elem_id="top-nav-left"):
 
396
  )
397
 
398
  # Wiring function to UI (update label, confidence, bars, explanations)
 
399
  def update_ui(text):
400
  label, score, _, phrases, explanation, tags = classify(text)
401
  score_pct = int(score * 100)
 
455
  inputs=None,
456
  outputs=input_text,
457
  )
458
+
459
+ if __name__ == "__main__":
460
+ demo.launch(
461
+ css=custom_css,
462
+ theme=gr.themes.Soft()
463
+ )
464