Vera-ZWY commited on
Commit
a84325a
·
verified ·
1 Parent(s): 46dc88b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -16,8 +16,7 @@ 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
-
20
-
21
 
22
  def stream_chat_with_rag(
23
  message: str,
@@ -246,8 +245,13 @@ with gr.Blocks(title="Reddit Election Analysis") as demo:
246
  gr.Markdown("## Top words of the relevant Q&A")
247
  with gr.Row():
248
  topic_btn = gr.Button("Topicalize the RAG sources")
 
 
 
 
 
249
  topic_plot = gr.Plot(
250
- label="Topic Distribution",
251
  container=True, # Ensures the plot is contained within its area
252
  elem_classes="topic-plot" # Add a custom class for styling
253
  )
 
16
  # Initialize the Gradio Client for the specified API
17
  client = Client("mangoesai/Elections_Comparison_Agent_V4.1", hf_token=HF_TOKEN)
18
 
19
+ # query_input = ""
 
20
 
21
  def stream_chat_with_rag(
22
  message: str,
 
245
  gr.Markdown("## Top words of the relevant Q&A")
246
  with gr.Row():
247
  topic_btn = gr.Button("Topicalize the RAG sources")
248
+ query_input = gr.Textbox(
249
+ label="Your Question For Topicalize",
250
+ placeholder="Copy and past your question there to vilaulize the top words of relevant topic"
251
+ )
252
+
253
  topic_plot = gr.Plot(
254
+ label="Top Words Distribution",
255
  container=True, # Ensures the plot is contained within its area
256
  elem_classes="topic-plot" # Add a custom class for styling
257
  )