Vera-ZWY commited on
Commit
5e8cbf8
·
verified ·
1 Parent(s): 2f83adb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -16,7 +16,6 @@ HF_TOKEN = os.getenv("HF_TOKEN") # Replace with your actual token if not using
16
  # Initialize the Gradio Client for the specified API
17
  client = Client("mangoesai/Elections_Comparison_Agent_V4.1", hf_token=HF_TOKEN)
18
 
19
- # client_name = ['2016 Election','2024 Election', 'Comparison two years']
20
 
21
 
22
 
@@ -192,7 +191,7 @@ with gr.Blocks(title="Reddit Election Analysis") as demo:
192
  gr.Markdown("Ask questions about election-related comments and posts")
193
 
194
  with gr.Row():
195
- with gr.Row():
196
  year_selector = gr.Radio(
197
  choices=["2016 Election", "2024 Election", "Comparison two years"],
198
  label="Select Election Year",
@@ -221,14 +220,14 @@ with gr.Blocks(title="Reddit Election Analysis") as demo:
221
  # lines=20
222
  # )
223
 
224
- with gr.Row():
225
  gr.ChatInterface(stream_chat_with_rag,
226
  type="messages",
227
  # chatbot=stream_chat_with_rag,
228
  additional_inputs = [year_selector]
229
  )
230
 
231
- gr.Markdown("## Top works of the relevant Q&A")
232
  # with gr.Row():
233
  # output_plot = gr.Plot(
234
  # label="Topic Distribution",
 
16
  # Initialize the Gradio Client for the specified API
17
  client = Client("mangoesai/Elections_Comparison_Agent_V4.1", hf_token=HF_TOKEN)
18
 
 
19
 
20
 
21
 
 
191
  gr.Markdown("Ask questions about election-related comments and posts")
192
 
193
  with gr.Row():
194
+ with gr.Column(scale = 1):
195
  year_selector = gr.Radio(
196
  choices=["2016 Election", "2024 Election", "Comparison two years"],
197
  label="Select Election Year",
 
220
  # lines=20
221
  # )
222
 
223
+ with gr.Column(scale = 2):
224
  gr.ChatInterface(stream_chat_with_rag,
225
  type="messages",
226
  # chatbot=stream_chat_with_rag,
227
  additional_inputs = [year_selector]
228
  )
229
 
230
+ gr.Markdown("## Top words of the relevant Q&A")
231
  # with gr.Row():
232
  # output_plot = gr.Plot(
233
  # label="Topic Distribution",