buraktrk commited on
Commit
12754f2
·
verified ·
1 Parent(s): b73cdc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -5
app.py CHANGED
@@ -209,19 +209,32 @@ def predict_opinion(excel_file: gr.File):
209
  with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as demo:
210
  gr.Markdown("# Denetçi Görüşü Tahmin Uygulaması")
211
 
 
212
  with gr.Row():
213
- file_in = gr.File(file_types=[".xlsx", ".xls", ".xlsm"], label="Excel Yükleyin")
214
- btn = gr.Button("Tahmin Et", variant="primary")
 
 
 
215
 
 
216
  gr.Examples(
217
  examples=EXAMPLE_XLSX,
218
  inputs=file_in,
219
- label="Örnek Dosyayı Deneyin",
220
  cache_examples=False,
221
  )
222
 
223
- out_df = gr.Dataframe(wrap=True, show_label=False, row_count=0)
224
- btn.click(predict_opinion, file_in, out_df)
 
 
 
 
 
 
 
 
225
 
226
  if __name__ == "__main__":
227
  demo.launch()
 
209
  with gr.Blocks(theme=gr.themes.Default(primary_hue="blue")) as demo:
210
  gr.Markdown("# Denetçi Görüşü Tahmin Uygulaması")
211
 
212
+ # 1️ Üst: Dosya yükle ve buton
213
  with gr.Row():
214
+ file_in = gr.File(
215
+ file_types=[".xlsx", ".xls", ".xlsm"],
216
+ label="Excel Yükleyin"
217
+ )
218
+ btn = gr.Button("Tahmin Et", variant="primary")
219
 
220
+ # 2️ Örnek Excel dosyaları
221
  gr.Examples(
222
  examples=EXAMPLE_XLSX,
223
  inputs=file_in,
224
+ label="💾 Örnek Dosyayı Deneyin",
225
  cache_examples=False,
226
  )
227
 
228
+ # 3️ Sonuçlar tablosu (sayfalama olmadan)
229
+ out_df = gr.Dataframe(
230
+ wrap=True,
231
+ show_label=False,
232
+ row_count="fixed", # 🔥 Sayfalama çubuğu kalkar
233
+ visible=True
234
+ )
235
+
236
+ # 4️ Tahmin fonksiyonu bağla
237
+ btn.click(predict_opinion, inputs=file_in, outputs=out_df)
238
 
239
  if __name__ == "__main__":
240
  demo.launch()