tahamueed23 commited on
Commit
07f1039
·
verified ·
1 Parent(s): dec23ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -452,7 +452,15 @@ def clear_logs():
452
  os.remove(SAVE_FILE)
453
  return pd.DataFrame(columns=["Sentence", "Language", "Sentiment", "Confidence", "Strong_Words", "Timestamp"])
454
 
455
- with gr.Blocks(title="Multilingual Sentiment Analysis") as demo:
 
 
 
 
 
 
 
 
456
  gr.Markdown("""
457
  # 🌍 Advanced Multilingual Sentiment Analysis
458
  **English • Urdu • Roman Urdu**
@@ -500,17 +508,18 @@ with gr.Blocks(title="Multilingual Sentiment Analysis") as demo:
500
 
501
  out_exp = gr.Textbox(label="💡 Detailed Explanation", lines=3)
502
 
503
- # Bottom row with analysis history taking 75% width
504
  with gr.Row():
505
- with gr.Column(scale=3): # 75% width (3/4)
 
506
  logs_df = gr.Dataframe(
507
  headers=["Sentence", "Language", "Sentiment", "Confidence", "Strong_Words", "Timestamp"],
508
- label="📋 Analysis History",
509
  interactive=False,
510
  wrap=True,
511
- height=400
512
  )
513
- with gr.Column(scale=1): # 25% width (1/4)
514
  gr.Markdown("### ℹ️ Information")
515
  gr.Markdown("""
516
  **How to use:**
 
452
  os.remove(SAVE_FILE)
453
  return pd.DataFrame(columns=["Sentence", "Language", "Sentiment", "Confidence", "Strong_Words", "Timestamp"])
454
 
455
+ with gr.Blocks(title="Multilingual Sentiment Analysis", css="""
456
+ .container {
457
+ max-width: 1200px;
458
+ margin: auto;
459
+ }
460
+ .history-panel {
461
+ min-height: 400px;
462
+ }
463
+ """) as demo:
464
  gr.Markdown("""
465
  # 🌍 Advanced Multilingual Sentiment Analysis
466
  **English • Urdu • Roman Urdu**
 
508
 
509
  out_exp = gr.Textbox(label="💡 Detailed Explanation", lines=3)
510
 
511
+ # Bottom row with analysis history taking most of the space
512
  with gr.Row():
513
+ with gr.Column(scale=3): # Takes more space
514
+ gr.Markdown("### 📋 Analysis History")
515
  logs_df = gr.Dataframe(
516
  headers=["Sentence", "Language", "Sentiment", "Confidence", "Strong_Words", "Timestamp"],
517
+ label="",
518
  interactive=False,
519
  wrap=True,
520
+ elem_classes=["history-panel"]
521
  )
522
+ with gr.Column(scale=1): # Takes less space
523
  gr.Markdown("### ℹ️ Information")
524
  gr.Markdown("""
525
  **How to use:**