HakshaySundar commited on
Commit
41adfee
1 Parent(s): f5177f7

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -22,15 +22,15 @@ with gr.Blocks(css='styles.css') as app:
22
 
23
  with gr.Tab("FRE"):
24
  with gr.Row():
25
- input_text = gr.Textbox(label="Input Text", placeholder="Type here...", lines=4, scale = 2.5)
26
- fetch_score_and_lvl_btn = gr.Button("Fetch Score and Level", scale = 0.5)
27
 
28
  output_input_reading_score = gr.Textbox(label="Input Text Reading Score", placeholder="Input Text Reading Score...", lines=1)
29
  output_input_reading_level = gr.Textbox(label="Input Text Reading Level", placeholder="Input Text Reading Level...", lines=1)
30
 
31
  fetch_score_and_lvl_btn.click(
32
  fn=user_input_readability_level,
33
- inputs=[input_text, model_types[0]],
34
  outputs=[output_input_reading_score, output_input_reading_level]
35
  )
36
 
@@ -46,21 +46,21 @@ with gr.Blocks(css='styles.css') as app:
46
 
47
  convert_button.click(
48
  fn=convert_text,
49
- inputs=[input_text, grade_level, output_input_reading_score, model_types[0]],
50
  outputs=[output_converted_text, output_similarity, output_reading_level, output_message]
51
  )
52
 
53
  with gr.Tab("SBERT"):
54
  with gr.Row():
55
- input_text = gr.Textbox(label="Input Text", placeholder="Type here...", lines=4, scale = 2.5)
56
- fetch_score_and_lvl_btn = gr.Button("Fetch Score and Level", scale = 0.5)
57
 
58
  output_input_reading_score = gr.Textbox(label="Input Text Reading Score", placeholder="Input Text Reading Score...", lines=1)
59
  output_input_reading_level = gr.Textbox(label="Input Text Reading Level", placeholder="Input Text Reading Level...", lines=1)
60
 
61
  fetch_score_and_lvl_btn.click(
62
  fn=user_input_readability_level,
63
- inputs=[input_text, model_types[1]],
64
  outputs=[output_input_reading_score, output_input_reading_level]
65
  )
66
 
@@ -76,7 +76,7 @@ with gr.Blocks(css='styles.css') as app:
76
 
77
  convert_button.click(
78
  fn=convert_text,
79
- inputs=[input_text, grade_level, output_input_reading_score, model_types[1]],
80
  outputs=[output_converted_text, output_similarity, output_reading_level, output_message]
81
  )
82
 
 
22
 
23
  with gr.Tab("FRE"):
24
  with gr.Row():
25
+ input_text = gr.Textbox(label="Input Text", placeholder="Type here...", lines=4, scale = 2)
26
+ fetch_score_and_lvl_btn = gr.Button("Fetch Score and Level", scale = 1)
27
 
28
  output_input_reading_score = gr.Textbox(label="Input Text Reading Score", placeholder="Input Text Reading Score...", lines=1)
29
  output_input_reading_level = gr.Textbox(label="Input Text Reading Level", placeholder="Input Text Reading Level...", lines=1)
30
 
31
  fetch_score_and_lvl_btn.click(
32
  fn=user_input_readability_level,
33
+ inputs=[input_text, "FRE"],
34
  outputs=[output_input_reading_score, output_input_reading_level]
35
  )
36
 
 
46
 
47
  convert_button.click(
48
  fn=convert_text,
49
+ inputs=[input_text, grade_level, output_input_reading_score, "FRE"],
50
  outputs=[output_converted_text, output_similarity, output_reading_level, output_message]
51
  )
52
 
53
  with gr.Tab("SBERT"):
54
  with gr.Row():
55
+ input_text = gr.Textbox(label="Input Text", placeholder="Type here...", lines=4, scale = 2)
56
+ fetch_score_and_lvl_btn = gr.Button("Fetch Score and Level", scale = 1)
57
 
58
  output_input_reading_score = gr.Textbox(label="Input Text Reading Score", placeholder="Input Text Reading Score...", lines=1)
59
  output_input_reading_level = gr.Textbox(label="Input Text Reading Level", placeholder="Input Text Reading Level...", lines=1)
60
 
61
  fetch_score_and_lvl_btn.click(
62
  fn=user_input_readability_level,
63
+ inputs=[input_text, "SBERT"],
64
  outputs=[output_input_reading_score, output_input_reading_level]
65
  )
66
 
 
76
 
77
  convert_button.click(
78
  fn=convert_text,
79
+ inputs=[input_text, grade_level, output_input_reading_score, "SBERT"],
80
  outputs=[output_converted_text, output_similarity, output_reading_level, output_message]
81
  )
82