Update app.py
Browse files
app.py
CHANGED
@@ -244,17 +244,18 @@ with gr.Blocks(title="Reddit Election Analysis") as demo:
|
|
244 |
|
245 |
gr.Markdown("## Top words of the relevant Q&A")
|
246 |
with gr.Row():
|
247 |
-
|
248 |
-
|
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 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
258 |
|
259 |
# Add custom CSS to ensure proper plot sizing
|
260 |
gr.HTML("""
|
|
|
244 |
|
245 |
gr.Markdown("## Top words of the relevant Q&A")
|
246 |
with gr.Row():
|
247 |
+
gr.Column(scale = 1):
|
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 |
+
topic_btn = gr.Button("Topicalize the RAG sources")
|
253 |
+
gr.Column(scale = 2)
|
254 |
+
topic_plot = gr.Plot(
|
255 |
+
label="Top Words Distribution",
|
256 |
+
container=True, # Ensures the plot is contained within its area
|
257 |
+
elem_classes="topic-plot" # Add a custom class for styling
|
258 |
+
)
|
259 |
|
260 |
# Add custom CSS to ensure proper plot sizing
|
261 |
gr.HTML("""
|