Update app.py
Browse files
app.py
CHANGED
@@ -21,16 +21,16 @@ def shap(txt, tok_level):
|
|
21 |
return txt
|
22 |
|
23 |
demo = gr.Interface(fn=shap,
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
if __name__ == "__main__":
|
36 |
demo.launch()
|
|
|
21 |
return txt
|
22 |
|
23 |
demo = gr.Interface(fn=shap,
|
24 |
+
[
|
25 |
+
gr.Textbox(label="기사", lines=30, placeholder="기사를 입력하세요."),
|
26 |
+
gr.Radio(["sentence", "word"], value="sentence", info="문장 단위의 해설은 sentence를 단어 단위의 해설은 word를 선택하세요.")
|
27 |
+
],
|
28 |
+
gr.HighlightedText(
|
29 |
+
label="Diff",
|
30 |
+
combine_adjacent=True,
|
31 |
+
show_legend=True,
|
32 |
+
color_map={"+": "red", "-": "green"}),
|
33 |
+
theme=gr.themes.Base())
|
34 |
|
35 |
if __name__ == "__main__":
|
36 |
demo.launch()
|