hashirlodhi commited on
Commit
3242017
ยท
verified ยท
1 Parent(s): a1094c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +172 -134
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- import matplotlib.pyplot as plt
3
- import matplotlib.patches as patches
4
- from matplotlib.animation import FuncAnimation
5
  import numpy as np
6
- from io import BytesIO
7
- import base64
8
 
9
  # Historical researchers of perfect numbers - Enhanced HTML version
10
  MATHEMATICIANS = """
@@ -70,13 +70,18 @@ def prime_factorization(n):
70
  return factors
71
 
72
  def divisors(n):
73
- """Find all divisors of n"""
74
- divs = []
75
- for i in range(1, int(n**0.5) + 1):
 
 
 
 
 
76
  if n % i == 0:
77
- divs.append(i)
78
- if i != n // i:
79
- divs.append(n // i)
80
  return sorted(divs)
81
 
82
  def classify_number(n, proper_sum):
@@ -101,119 +106,140 @@ def check_perfect(n):
101
  return proper_sum == n, divs, proper_sum, classification, emoji
102
 
103
  def create_enhanced_visualization(n):
104
- """Create comprehensive visualization with multiple plots"""
105
- n = int(n)
 
 
 
 
106
  if n <= 0:
107
  return "Please enter a positive integer.", None
108
 
109
- # Warning for very large numbers
110
- if n > 10000000:
111
- return f"โš ๏ธ Warning: {n} is too large for efficient visualization. Please try a number below 10,000,000.", None
112
-
113
  is_perfect, divs, proper_sum, classification, emoji = check_perfect(n)
114
  proper_divs = [d for d in divs if d != n]
115
 
116
- # Create figure with multiple subplots
117
- fig = plt.figure(figsize=(16, 10))
118
- fig.patch.set_facecolor('#f0f0f0')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
  # Define color scheme
121
  if classification == "Perfect":
122
- color_scheme = plt.cm.Greens
123
  main_color = '#2ecc71'
 
124
  elif classification == "Abundant":
125
- color_scheme = plt.cm.Blues
126
  main_color = '#3498db'
 
127
  else:
128
- color_scheme = plt.cm.Reds
129
  main_color = '#e74c3c'
 
130
 
131
  # 1. PIE CHART - Divisor Distribution
132
- ax1 = plt.subplot(2, 3, 1)
133
  if proper_divs:
134
- colors = color_scheme(np.linspace(0.3, 0.9, len(proper_divs)))
135
- wedges, texts, autotexts = ax1.pie(
136
- proper_divs,
137
- labels=[str(d) for d in proper_divs],
138
- autopct='%1.1f%%',
139
- startangle=90,
140
- colors=colors,
141
- explode=[0.05] * len(proper_divs),
142
- shadow=True
 
 
 
 
143
  )
144
- for autotext in autotexts:
145
- autotext.set_color('white')
146
- autotext.set_fontweight('bold')
147
- ax1.set_title(f'Proper Divisors of {n}', fontsize=12, fontweight='bold', pad=20)
148
 
149
  # 2. BAR CHART - Divisor Values
150
- ax2 = plt.subplot(2, 3, 2)
151
  if proper_divs:
152
- bars = ax2.bar(range(len(proper_divs)), proper_divs, color=colors, edgecolor='black', linewidth=1.5)
153
- ax2.set_xticks(range(len(proper_divs)))
154
- ax2.set_xticklabels([str(d) for d in proper_divs], rotation=45, ha='right')
155
- ax2.set_ylabel('Value', fontweight='bold')
156
- ax2.set_title('Divisor Magnitudes', fontsize=12, fontweight='bold', pad=20)
157
- ax2.grid(axis='y', alpha=0.3, linestyle='--')
158
-
159
- # Add value labels on bars
160
- for bar in bars:
161
- height = bar.get_height()
162
- ax2.text(bar.get_x() + bar.get_width()/2., height,
163
- f'{int(height)}',
164
- ha='center', va='bottom', fontweight='bold')
 
165
 
166
  # 3. COMPARISON BAR - Sum vs Number
167
- ax3 = plt.subplot(2, 3, 3)
168
  comparison = [proper_sum, n]
169
- labels = [f'Sum of Divisors\n({proper_sum})', f'Number\n({n})']
170
- bars = ax3.bar(labels, comparison, color=[main_color, '#95a5a6'], edgecolor='black', linewidth=2)
171
- ax3.set_ylabel('Value', fontweight='bold')
172
- ax3.set_title(f'{classification} Number Analysis {emoji}', fontsize=12, fontweight='bold', pad=20)
173
- ax3.grid(axis='y', alpha=0.3, linestyle='--')
 
 
 
 
 
 
 
174
 
175
  # Add difference annotation
176
  diff = abs(proper_sum - n)
177
- diff_pct = (diff / n) * 100
178
- ax3.text(0.5, max(comparison) * 0.5,
179
- f'Difference: {diff}\n({diff_pct:.1f}%)',
180
- ha='center', va='center',
181
- bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.8),
182
- fontsize=10, fontweight='bold')
 
 
 
 
183
 
184
  # 4. DIVISOR PAIRS VISUALIZATION
185
- ax4 = plt.subplot(2, 3, 4)
186
- ax4.axis('off')
187
-
188
- # Show divisor pairs
189
- pairs_text = "๐Ÿ”— **Divisor Pairs:**\n\n"
190
- sqrt_n = int(n**0.5)
191
  pairs = []
192
  for d in proper_divs:
193
  if d <= sqrt_n and d != n // d:
194
  pairs.append((d, n // d))
195
 
196
- for i, (d1, d2) in enumerate(pairs):
197
- pairs_text += f"{d1} ร— {d2} = {n}\n"
198
-
199
- if n in divs:
200
- if int(n**0.5)**2 == n:
201
- pairs_text += f"{int(n**0.5)} ร— {int(n**0.5)} = {n} โœ“"
202
-
203
- ax4.text(0.1, 0.9, pairs_text, transform=ax4.transAxes,
204
- fontsize=10, verticalalignment='top', family='monospace',
205
- bbox=dict(boxstyle='round', facecolor='lightblue', alpha=0.7))
 
 
 
 
 
 
 
 
 
206
 
207
  # 5. PRIME FACTORIZATION
208
- ax5 = plt.subplot(2, 3, 5)
209
- ax5.axis('off')
210
-
211
  prime_factors = prime_factorization(n)
212
- factor_text = f"๐Ÿ”ข **Prime Factorization of {n}:**\n\n"
213
-
214
  if prime_factors:
215
- # Count occurrences
216
- from collections import Counter
217
  factor_counts = Counter(prime_factors)
218
  factor_parts = []
219
  for prime in sorted(factor_counts.keys()):
@@ -222,50 +248,61 @@ def create_enhanced_visualization(n):
222
  factor_parts.append(f"{prime}")
223
  else:
224
  factor_parts.append(f"{prime}^{count}")
225
- factor_text += " ร— ".join(factor_parts)
226
  else:
227
- factor_text += "1 (unity)"
228
-
229
- factor_text += f"\n\n๐Ÿ“Š **Number Properties:**\n"
230
- factor_text += f"โ€ข Total divisors: {len(divs)}\n"
231
- factor_text += f"โ€ข Proper divisors: {len(proper_divs)}\n"
232
- factor_text += f"โ€ข Sum of all divisors: {sum(divs)}\n"
233
- factor_text += f"โ€ข Classification: {classification} {emoji}"
234
-
235
- ax5.text(0.1, 0.9, factor_text, transform=ax5.transAxes,
236
- fontsize=10, verticalalignment='top', family='monospace',
237
- bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.7))
 
 
 
 
 
238
 
239
  # 6. MATHEMATICAL FORMULA
240
- ax6 = plt.subplot(2, 3, 6)
241
- ax6.axis('off')
242
-
243
- formula_text = "๐Ÿ“ **Perfect Number Definition:**\n\n"
244
- formula_text += "A perfect number equals the sum\n"
245
- formula_text += "of its proper divisors:\n\n"
246
-
247
  if proper_divs:
248
- sum_parts = " + ".join([str(d) for d in proper_divs])
249
- if len(sum_parts) > 50:
250
- # Truncate if too long
251
- sum_parts = sum_parts[:47] + "..."
252
- formula_text += f"{sum_parts}\n= {proper_sum}\n\n"
 
 
 
253
 
254
  if is_perfect:
255
- formula_text += f"โœ… {proper_sum} = {n}\n"
256
- formula_text += f"Therefore, {n} is PERFECT! ๐ŸŽ‰"
 
257
  else:
258
- formula_text += f"โŒ {proper_sum} โ‰  {n}\n"
259
- if classification == "Abundant":
260
- formula_text += f"Sum exceeds number\n(Abundant)"
261
- else:
262
- formula_text += f"Sum is less than number\n(Deficient)"
263
-
264
- ax6.text(0.1, 0.9, formula_text, transform=ax6.transAxes,
265
- fontsize=10, verticalalignment='top', family='monospace',
266
- bbox=dict(boxstyle='round', facecolor='lightgreen' if is_perfect else 'lightcoral', alpha=0.7))
267
 
268
- plt.tight_layout(pad=3.0)
 
 
 
 
 
 
 
 
 
269
 
270
  # Generate detailed message with HTML formatting
271
  msg = f"""
@@ -280,14 +317,14 @@ def create_enhanced_visualization(n):
280
 
281
  <div style='background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-left: 6px solid #2196F3;'>
282
  <h3 style='color: #1976D2; margin-top: 0;'>๐Ÿ“Š Divisor Information</h3>
283
- <p style='font-size: 16px; line-height: 1.8; color: #000;'><strong style='color: #000;'>All Divisors:</strong> <span style='color: #0D47A1; font-weight: bold;'>{divs}</span></p>
284
- <p style='font-size: 16px; line-height: 1.8; color: #000;'><strong style='color: #000;'>Proper Divisors (excluding {n}):</strong> <span style='color: #0D47A1; font-weight: bold;'>{proper_divs}</span></p>
285
  </div>
286
 
287
  <div style='background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-left: 6px solid #FF9800;'>
288
  <h3 style='color: #F57C00; margin-top: 0;'>๐Ÿงฎ Sum Calculation</h3>
289
  <p style='font-size: 18px; line-height: 1.8; font-weight: bold;'>
290
- {' + '.join([f"<span style='background: #FFE0B2; color: #BF360C; padding: 3px 8px; border-radius: 5px; margin: 2px; display: inline-block;'>{d}</span>" for d in proper_divs])} = <span style='background: #FF6F00; color: white; padding: 5px 12px; border-radius: 5px;'>{proper_sum}</span>
291
  </p>
292
  </div>
293
 
@@ -312,31 +349,32 @@ def create_enhanced_visualization(n):
312
  # Create Gradio interface
313
  with gr.Blocks(theme=gr.themes.Soft(), title="Perfect Number Explorer") as demo:
314
  gr.Markdown("""
315
- # ๐Ÿ”ข Perfect Number Visualizer & Explorer
316
 
317
  ### What are Perfect Numbers?
318
  A **perfect number** is a positive integer that equals the sum of its proper divisors (divisors excluding the number itself).
319
 
320
  **Example:** 6 is perfect because 1 + 2 + 3 = 6
321
 
322
- ### Try these perfect numbers: 6, 28, 496, 8128
 
323
  """)
324
 
325
  with gr.Row():
326
  with gr.Column(scale=1):
327
  number_input = gr.Number(
328
- label="Enter a Number (1 - 1,000,000)",
329
  value=6,
330
  precision=0
331
  )
332
  analyze_btn = gr.Button("๐Ÿ” Analyze Number", variant="primary", size="lg")
333
 
334
  gr.Markdown("""
335
- ### Quick Facts:
336
- - Only 51 perfect numbers are known
337
- - All known perfect numbers are even
338
- - No odd perfect number has ever been found
339
- - Perfect numbers are extremely rare!
340
  """)
341
 
342
  with gr.Row():
@@ -345,7 +383,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="Perfect Number Explorer") as demo:
345
  )
346
 
347
  with gr.Row():
348
- plot_output = gr.Plot(label="๐Ÿ“ˆ Visual Analysis")
349
 
350
  analyze_btn.click(
351
  fn=create_enhanced_visualization,
 
1
  import gradio as gr
2
+ import plotly.graph_objects as go
3
+ import plotly.express as px
4
+ from plotly.subplots import make_subplots
5
  import numpy as np
6
+ from collections import Counter
7
+ import math
8
 
9
  # Historical researchers of perfect numbers - Enhanced HTML version
10
  MATHEMATICIANS = """
 
70
  return factors
71
 
72
  def divisors(n):
73
+ """Find all divisors of n efficiently"""
74
+ if n == 1:
75
+ return [1]
76
+
77
+ divs = set()
78
+ sqrt_n = int(math.isqrt(n))
79
+
80
+ for i in range(1, sqrt_n + 1):
81
  if n % i == 0:
82
+ divs.add(i)
83
+ divs.add(n // i)
84
+
85
  return sorted(divs)
86
 
87
  def classify_number(n, proper_sum):
 
106
  return proper_sum == n, divs, proper_sum, classification, emoji
107
 
108
  def create_enhanced_visualization(n):
109
+ """Create comprehensive visualization with Plotly for any positive integer"""
110
+ try:
111
+ n = int(n)
112
+ except (ValueError, TypeError):
113
+ return "Please enter a valid positive integer.", None
114
+
115
  if n <= 0:
116
  return "Please enter a positive integer.", None
117
 
 
 
 
 
118
  is_perfect, divs, proper_sum, classification, emoji = check_perfect(n)
119
  proper_divs = [d for d in divs if d != n]
120
 
121
+ # Create subplots with Plotly
122
+ fig = make_subplots(
123
+ rows=2, cols=3,
124
+ subplot_titles=(
125
+ f'Proper Divisors of {n}',
126
+ 'Divisor Magnitudes',
127
+ f'{classification} Number Analysis {emoji}',
128
+ 'Divisor Pairs',
129
+ f'Prime Factorization of {n}',
130
+ 'Perfect Number Definition'
131
+ ),
132
+ specs=[
133
+ [{"type": "pie"}, {"type": "bar"}, {"type": "bar"}],
134
+ [{"type": "table"}, {"type": "table"}, {"type": "table"}]
135
+ ],
136
+ vertical_spacing=0.1,
137
+ horizontal_spacing=0.05
138
+ )
139
 
140
  # Define color scheme
141
  if classification == "Perfect":
 
142
  main_color = '#2ecc71'
143
+ colors = px.colors.sequential.Greens[2:8]
144
  elif classification == "Abundant":
 
145
  main_color = '#3498db'
146
+ colors = px.colors.sequential.Blues[2:8]
147
  else:
 
148
  main_color = '#e74c3c'
149
+ colors = px.colors.sequential.Reds[2:8]
150
 
151
  # 1. PIE CHART - Divisor Distribution
 
152
  if proper_divs:
153
+ # Limit to top 20 divisors for readability
154
+ display_divs = proper_divs[:20] if len(proper_divs) > 20 else proper_divs
155
+ fig.add_trace(
156
+ go.Pie(
157
+ labels=[str(d) for d in display_divs],
158
+ values=display_divs,
159
+ textinfo='label+percent',
160
+ insidetextorientation='radial',
161
+ marker=dict(colors=colors * (len(display_divs) // len(colors) + 1)),
162
+ textfont=dict(size=12),
163
+ hovertemplate="Divisor: %{label}<br>Value: %{value}<extra></extra>"
164
+ ),
165
+ row=1, col=1
166
  )
 
 
 
 
167
 
168
  # 2. BAR CHART - Divisor Values
 
169
  if proper_divs:
170
+ # Limit to top 20 divisors for readability
171
+ display_divs = proper_divs[:20] if len(proper_divs) > 20 else proper_divs
172
+ fig.add_trace(
173
+ go.Bar(
174
+ x=[str(d) for d in display_divs],
175
+ y=display_divs,
176
+ marker_color=main_color,
177
+ text=display_divs,
178
+ textposition='outside',
179
+ hovertemplate="Divisor: %{x}<br>Value: %{y}<extra></extra>"
180
+ ),
181
+ row=1, col=2
182
+ )
183
+ fig.update_xaxes(tickangle=45, row=1, col=2)
184
 
185
  # 3. COMPARISON BAR - Sum vs Number
 
186
  comparison = [proper_sum, n]
187
+ labels = [f'Sum of Divisors<br>({proper_sum})', f'Number<br>({n})']
188
+ fig.add_trace(
189
+ go.Bar(
190
+ x=labels,
191
+ y=comparison,
192
+ marker_color=[main_color, '#95a5a6'],
193
+ text=comparison,
194
+ textposition='outside',
195
+ hovertemplate="%{x}<br>Value: %{y}<extra></extra>"
196
+ ),
197
+ row=1, col=3
198
+ )
199
 
200
  # Add difference annotation
201
  diff = abs(proper_sum - n)
202
+ diff_pct = (diff / n) * 100 if n != 0 else 0
203
+ fig.add_annotation(
204
+ x=0.5, y=max(comparison) * 0.5,
205
+ text=f"Difference: {diff}<br>({diff_pct:.1f}%)",
206
+ showarrow=False,
207
+ bgcolor="wheat",
208
+ bordercolor="black",
209
+ font=dict(size=12, color="black"),
210
+ row=1, col=3
211
+ )
212
 
213
  # 4. DIVISOR PAIRS VISUALIZATION
214
+ sqrt_n = int(math.isqrt(n))
 
 
 
 
 
215
  pairs = []
216
  for d in proper_divs:
217
  if d <= sqrt_n and d != n // d:
218
  pairs.append((d, n // d))
219
 
220
+ if pairs:
221
+ pair_labels = [f"{d1} ร— {d2}" for d1, d2 in pairs]
222
+ pair_values = [n] * len(pairs)
223
+ fig.add_trace(
224
+ go.Table(
225
+ header=dict(values=["Divisor Pairs", "Product"]),
226
+ cells=dict(values=[pair_labels, pair_values]),
227
+ columnwidth=[100, 50]
228
+ ),
229
+ row=2, col=1
230
+ )
231
+ else:
232
+ fig.add_trace(
233
+ go.Table(
234
+ header=dict(values=["Divisor Pairs"]),
235
+ cells=dict(values=[["No pairs found"]])
236
+ ),
237
+ row=2, col=1
238
+ )
239
 
240
  # 5. PRIME FACTORIZATION
 
 
 
241
  prime_factors = prime_factorization(n)
 
 
242
  if prime_factors:
 
 
243
  factor_counts = Counter(prime_factors)
244
  factor_parts = []
245
  for prime in sorted(factor_counts.keys()):
 
248
  factor_parts.append(f"{prime}")
249
  else:
250
  factor_parts.append(f"{prime}^{count}")
251
+ factorization = " ร— ".join(factor_parts)
252
  else:
253
+ factorization = "1 (unity)"
254
+
255
+ properties = [
256
+ f"Total divisors: {len(divs)}",
257
+ f"Proper divisors: {len(proper_divs)}",
258
+ f"Sum of all divisors: {sum(divs)}",
259
+ f"Classification: {classification} {emoji}"
260
+ ]
261
+
262
+ fig.add_trace(
263
+ go.Table(
264
+ header=dict(values=["Prime Factorization", "Number Properties"]),
265
+ cells=dict(values=[[factorization], ["<br>".join(properties)]])
266
+ ),
267
+ row=2, col=2
268
+ )
269
 
270
  # 6. MATHEMATICAL FORMULA
 
 
 
 
 
 
 
271
  if proper_divs:
272
+ sum_parts = " + ".join([str(d) for d in proper_divs[:10]]) # Limit to first 10
273
+ if len(proper_divs) > 10:
274
+ sum_parts += " + ..."
275
+ formula = f"{sum_parts} = {proper_sum}"
276
+ else:
277
+ formula = "No proper divisors"
278
+
279
+ result = f"{'โœ…' if is_perfect else 'โŒ'} {proper_sum} {'=' if is_perfect else 'โ‰ '} {n}"
280
 
281
  if is_perfect:
282
+ conclusion = "PERFECT NUMBER! ๐ŸŽ‰"
283
+ elif classification == "Abundant":
284
+ conclusion = f"Abundant (Excess: {proper_sum - n})"
285
  else:
286
+ conclusion = f"Deficient (Deficiency: {n - proper_sum})"
287
+
288
+ fig.add_trace(
289
+ go.Table(
290
+ header=dict(values=["Perfect Number Definition"]),
291
+ cells=dict(values=[[formula, result, conclusion]])
292
+ ),
293
+ row=2, col=3
294
+ )
295
 
296
+ # Update layout
297
+ fig.update_layout(
298
+ height=800,
299
+ showlegend=False,
300
+ title_text=f"Comprehensive Analysis of {n}",
301
+ title_x=0.5,
302
+ title_font_size=24,
303
+ plot_bgcolor='rgba(0,0,0,0)',
304
+ paper_bgcolor='rgba(0,0,0,0)'
305
+ )
306
 
307
  # Generate detailed message with HTML formatting
308
  msg = f"""
 
317
 
318
  <div style='background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-left: 6px solid #2196F3;'>
319
  <h3 style='color: #1976D2; margin-top: 0;'>๐Ÿ“Š Divisor Information</h3>
320
+ <p style='font-size: 16px; line-height: 1.8; color: #000;'><strong style='color: #000;'>All Divisors:</strong> <span style='color: #0D47A1; font-weight: bold;'>{divs[:20]}{"..." if len(divs) > 20 else ""}</span></p>
321
+ <p style='font-size: 16px; line-height: 1.8; color: #000;'><strong style='color: #000;'>Proper Divisors (excluding {n}):</strong> <span style='color: #0D47A1; font-weight: bold;'>{proper_divs[:20]}{"..." if len(proper_divs) > 20 else ""}</span></p>
322
  </div>
323
 
324
  <div style='background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border-left: 6px solid #FF9800;'>
325
  <h3 style='color: #F57C00; margin-top: 0;'>๐Ÿงฎ Sum Calculation</h3>
326
  <p style='font-size: 18px; line-height: 1.8; font-weight: bold;'>
327
+ {' + '.join([f"<span style='background: #FFE0B2; color: #BF360C; padding: 3px 8px; border-radius: 5px; margin: 2px; display: inline-block;'>{d}</span>" for d in proper_divs[:10]])}{" + ..." if len(proper_divs) > 10 else ""} = <span style='background: #FF6F00; color: white; padding: 5px 12px; border-radius: 5px;'>{proper_sum}</span>
328
  </p>
329
  </div>
330
 
 
349
  # Create Gradio interface
350
  with gr.Blocks(theme=gr.themes.Soft(), title="Perfect Number Explorer") as demo:
351
  gr.Markdown("""
352
+ # ๐Ÿ”ข Perfect Number Visualizer & Explorer (Unlimited Range!)
353
 
354
  ### What are Perfect Numbers?
355
  A **perfect number** is a positive integer that equals the sum of its proper divisors (divisors excluding the number itself).
356
 
357
  **Example:** 6 is perfect because 1 + 2 + 3 = 6
358
 
359
+ ### Try these perfect numbers: 6, 28, 496, 8128, 33550336
360
+ ### Or try very large numbers like 2^31-1 (2147483647) or even larger!
361
  """)
362
 
363
  with gr.Row():
364
  with gr.Column(scale=1):
365
  number_input = gr.Number(
366
+ label="Enter ANY Positive Integer",
367
  value=6,
368
  precision=0
369
  )
370
  analyze_btn = gr.Button("๐Ÿ” Analyze Number", variant="primary", size="lg")
371
 
372
  gr.Markdown("""
373
+ ### Key Features:
374
+ - **Unlimited Range**: Analyze ANY positive integer (no upper limit!)
375
+ - **Optimized Algorithms**: Efficiently handles very large numbers
376
+ - **Interactive Visualizations**: Zoom, pan, and hover for details
377
+ - **Comprehensive Analysis**: Divisors, factorization, and classification
378
  """)
379
 
380
  with gr.Row():
 
383
  )
384
 
385
  with gr.Row():
386
+ plot_output = gr.Plot(label="๐Ÿ“ˆ Interactive Visual Analysis")
387
 
388
  analyze_btn.click(
389
  fn=create_enhanced_visualization,