Mjwarren3 commited on
Commit
7be825c
1 Parent(s): 127f052

Improving styling

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -16,16 +16,17 @@ with gr.Blocks() as app:
16
  with gr.Row():
17
  with gr.Column(scale=1):
18
  input_text1 = gr.Textbox(label="Input Text for Reading Level")
19
- button1 = gr.Button("Calculate Reading Level")
20
  with gr.Column(scale=1):
21
  input_reading_level = gr.Textbox(label="Input Text Reading Level")
22
-
23
  with gr.Row():
24
  with gr.Column(scale=1):
25
  input_text2 = gr.Textbox(label="Input Text for Generation")
26
  target_level = gr.Dropdown(choices=["1", "2", "3", "4", "5"], label="Target Reading Level")
27
- button2 = gr.Button("Generate and Analyze Text")
28
  with gr.Column(scale=1):
 
29
  output_text = gr.Textbox(label="Output Text")
30
  output_reading_level = gr.Textbox(label="Output Text Reading Level")
31
  output_text_similarity = gr.Textbox(label="Output Text Similarity to Input Text")
@@ -39,7 +40,16 @@ with gr.Blocks() as app:
39
  button2.click(
40
  fn=generate_and_analyze_text,
41
  inputs=[input_text2, target_level],
42
- outputs=[input_reading_level, output_text, output_reading_level, output_text_similarity]
43
  )
44
 
 
 
 
 
 
 
 
 
 
45
  app.launch()
 
16
  with gr.Row():
17
  with gr.Column(scale=1):
18
  input_text1 = gr.Textbox(label="Input Text for Reading Level")
19
+ button1 = gr.Button("Calculate Reading Level", elem_id="button1")
20
  with gr.Column(scale=1):
21
  input_reading_level = gr.Textbox(label="Input Text Reading Level")
22
+
23
  with gr.Row():
24
  with gr.Column(scale=1):
25
  input_text2 = gr.Textbox(label="Input Text for Generation")
26
  target_level = gr.Dropdown(choices=["1", "2", "3", "4", "5"], label="Target Reading Level")
27
+ button2 = gr.Button("Generate and Analyze Text", elem_id="button2")
28
  with gr.Column(scale=1):
29
+ display_input_level = gr.Textbox(label="Input Text Reading Level (Post-Generation)")
30
  output_text = gr.Textbox(label="Output Text")
31
  output_reading_level = gr.Textbox(label="Output Text Reading Level")
32
  output_text_similarity = gr.Textbox(label="Output Text Similarity to Input Text")
 
40
  button2.click(
41
  fn=generate_and_analyze_text,
42
  inputs=[input_text2, target_level],
43
+ outputs=[display_input_level, output_text, output_reading_level, output_text_similarity]
44
  )
45
 
46
+ # Custom CSS to style the buttons
47
+ app.css = """
48
+ #button1, #button2 {
49
+ background-color: orange;
50
+ color: white;
51
+ width: 100%;
52
+ }
53
+ """
54
+
55
  app.launch()