MHamdan commited on
Commit
86decb6
·
verified ·
1 Parent(s): 1575e7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -78,11 +78,6 @@ def create_interface():
78
  submit_button = gr.Button("Analyze")
79
  progress_bar = gr.Progress()
80
 
81
- original_text_output = gr.Textbox(label="Original Text")
82
- summary_output = gr.Textbox(label="Summary")
83
- sentiment_output = gr.Textbox(label="Sentiment")
84
- topics_output = gr.Textbox(label="Topics")
85
-
86
  def update_input_visibility(input_type):
87
  text_input.visible = input_type == "Text"
88
  url_input.visible = input_type == "URL"
@@ -112,14 +107,14 @@ def create_interface():
112
  outputs=[original_text_output, summary_output, sentiment_output, topics_output]
113
  )
114
 
115
- interface.set_layout(
116
- gr.Tabs([
117
- gr.Tab(original_text_output, label="Original Text"),
118
- gr.Tab(summary_output, label="Summary"),
119
- gr.Tab(sentiment_output, label="Sentiment"),
120
- gr.Tab(topics_output, label="Topics")
121
- ])
122
- )
123
 
124
  return interface
125
 
 
78
  submit_button = gr.Button("Analyze")
79
  progress_bar = gr.Progress()
80
 
 
 
 
 
 
81
  def update_input_visibility(input_type):
82
  text_input.visible = input_type == "Text"
83
  url_input.visible = input_type == "URL"
 
107
  outputs=[original_text_output, summary_output, sentiment_output, topics_output]
108
  )
109
 
110
+ with gr.Tab("Original Text"):
111
+ original_text_output = gr.Textbox(label="Original Text")
112
+ with gr.Tab("Summary"):
113
+ summary_output = gr.Textbox(label="Summary")
114
+ with gr.Tab("Sentiment"):
115
+ sentiment_output = gr.Textbox(label="Sentiment")
116
+ with gr.Tab("Topics"):
117
+ topics_output = gr.Textbox(label="Topics")
118
 
119
  return interface
120