Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,16 @@ def reset_modules():
|
|
39 |
return res_empty, 0, 0, [], ""
|
40 |
|
41 |
|
42 |
-
theme = gr.themes.Default(text_size=gr.themes.sizes.
|
43 |
-
|
44 |
-
)
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
pre_load_1 = pipeline("sentiment-analysis", model="nlptown/bert-base-multilingual-uncased-sentiment")
|
48 |
pre_load_2 = pipeline("text-classification", model='DTAI-KULeuven/robbert-v2-dutch-sentiment')
|
49 |
pre_load_3 = pipeline("text-classification", model='distilbert-base-uncased-finetuned-sst-2-english')
|
@@ -94,7 +99,7 @@ with gr.Blocks(theme=theme) as demo:
|
|
94 |
sample_button_nl = gr.Button("Click to get a review in Dutch.", size='sm')
|
95 |
|
96 |
input_text = gr.Textbox(label="Review:", value="HELLO! Hallo!", visible=False, container=False)
|
97 |
-
interpretation1 = gr.components.Interpretation(input_text)
|
98 |
|
99 |
slider_1_1 = gr.Slider(label="Your rating: Dislike(0) —> Like(10)", maximum=10, step=1, container=True, min_width=200, height=80, show_label=True, interactive=True)
|
100 |
user_important = gr.Textbox(label="Which words are your guesses based on?", placeholder="Enter words that you think are important for the task")
|
|
|
39 |
return res_empty, 0, 0, [], ""
|
40 |
|
41 |
|
42 |
+
# theme = gr.themes.Default(text_size=gr.themes.sizes.text_md).set(
|
43 |
+
# input_text_size="24px",
|
44 |
+
# )
|
45 |
|
46 |
+
css = """
|
47 |
+
#warning {background-color: #FFCCCB}
|
48 |
+
.feedback textarea {font-size: 24px !important}
|
49 |
+
"""
|
50 |
+
|
51 |
+
with gr.Blocks(theme=gr.themes.Default(text_size=gr.themes.sizes.text_md)) as demo:
|
52 |
pre_load_1 = pipeline("sentiment-analysis", model="nlptown/bert-base-multilingual-uncased-sentiment")
|
53 |
pre_load_2 = pipeline("text-classification", model='DTAI-KULeuven/robbert-v2-dutch-sentiment')
|
54 |
pre_load_3 = pipeline("text-classification", model='distilbert-base-uncased-finetuned-sst-2-english')
|
|
|
99 |
sample_button_nl = gr.Button("Click to get a review in Dutch.", size='sm')
|
100 |
|
101 |
input_text = gr.Textbox(label="Review:", value="HELLO! Hallo!", visible=False, container=False)
|
102 |
+
interpretation1 = gr.components.Interpretation(input_text, elem_classes="feedback")
|
103 |
|
104 |
slider_1_1 = gr.Slider(label="Your rating: Dislike(0) —> Like(10)", maximum=10, step=1, container=True, min_width=200, height=80, show_label=True, interactive=True)
|
105 |
user_important = gr.Textbox(label="Which words are your guesses based on?", placeholder="Enter words that you think are important for the task")
|