cptcrk commited on
Commit
544f3d5
Β·
verified Β·
1 Parent(s): 8452db2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -26
app.py CHANGED
@@ -88,7 +88,7 @@ def add_example_text(current_text, example):
88
  return example
89
 
90
  # Gradio-interface met duidelijke instructies en styling
91
- with gr.Blocks() as demo:
92
  gr.Markdown(
93
  """
94
  <div style='font-size: 18px; font-weight: bold; text-align: center; color: #333;'>
@@ -110,9 +110,8 @@ with gr.Blocks() as demo:
110
  for example in example_sentences_top:
111
  gr.Button(example).click(add_example_text, inputs=[input_box, gr.Textbox(value=example, visible=False)], outputs=input_box, queue=False)
112
 
113
- # Oranje knop voor sentimentanalyse
114
- analyze_button = gr.Button("Tell me how I feel", interactive=True)
115
- analyze_button.style(full_width=True)
116
  output_box = gr.HTML(label="Results")
117
  plot_box = gr.Plot(label="Sentiment Distribution")
118
 
@@ -124,27 +123,6 @@ with gr.Blocks() as demo:
124
  for example in example_sentences_bottom:
125
  gr.Button(example).click(add_example_text, inputs=[input_box, gr.Textbox(value=example, visible=False)], outputs=input_box, queue=False)
126
 
127
- # CSS voor styling (oranje knop correct toegepast)
128
- css = """
129
- button.svelte-1ipelgc {
130
- background-color: #FFA500 !important;
131
- color: black !important;
132
- font-weight: bold;
133
- font-size: 16px;
134
- padding: 10px 20px;
135
- border-radius: 8px;
136
- border: none;
137
- cursor: pointer;
138
- }
139
- button.svelte-1ipelgc:hover {
140
- background-color: #FF8C00 !important;
141
- }
142
- """
143
-
144
- # Start de app met aangepaste CSS voor de oranje knop
145
  demo.launch(share=True)
146
 
147
-
148
-
149
-
150
-
 
88
  return example
89
 
90
  # Gradio-interface met duidelijke instructies en styling
91
+ with gr.Blocks(css=".orange-btn {background-color: #FFA500 !important; color: black !important; font-weight: bold; font-size: 16px; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer;} .orange-btn:hover {background-color: #FF8C00 !important;}") as demo:
92
  gr.Markdown(
93
  """
94
  <div style='font-size: 18px; font-weight: bold; text-align: center; color: #333;'>
 
110
  for example in example_sentences_top:
111
  gr.Button(example).click(add_example_text, inputs=[input_box, gr.Textbox(value=example, visible=False)], outputs=input_box, queue=False)
112
 
113
+ # Oranje knop voor sentimentanalyse (correct toegepast)
114
+ analyze_button = gr.Button("Tell me how I feel", elem_classes="orange-btn")
 
115
  output_box = gr.HTML(label="Results")
116
  plot_box = gr.Plot(label="Sentiment Distribution")
117
 
 
123
  for example in example_sentences_bottom:
124
  gr.Button(example).click(add_example_text, inputs=[input_box, gr.Textbox(value=example, visible=False)], outputs=input_box, queue=False)
125
 
126
+ # Start de app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  demo.launch(share=True)
128