immunobiotech commited on
Commit
e23f42b
ยท
verified ยท
1 Parent(s): 0f2db44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -781,9 +781,9 @@ with gr.Blocks(
781
 
782
  result_table = gr.Dataframe(
783
  headers=["Name", "Address", "Location", "Price", "Cuisine", "Award", "Description"],
784
- wrap=True,
785
- max_rows=10,
786
- interactive=False
787
  )
788
 
789
  def init_dropdowns():
@@ -819,8 +819,10 @@ with gr.Blocks(
819
  r['Price'], r['Cuisine'], r['Award'],
820
  r['Description']
821
  ])
 
 
822
 
823
- return filtered[:10] # ์ตœ๋Œ€ 10๊ฐœ ๊ฒฐ๊ณผ๋งŒ ๋ฐ˜ํ™˜
824
  except FileNotFoundError:
825
  return [["ํŒŒ์ผ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค", "", "", "", "", "", "find.csv ํŒŒ์ผ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”"]]
826
 
@@ -835,6 +837,8 @@ with gr.Blocks(
835
  outputs=result_table
836
  )
837
 
 
 
838
  # ์‚ฌ์šฉ ๊ฐ€์ด๋“œ ํƒญ
839
  with gr.TabItem("์ด์šฉ ๋ฐฉ๋ฒ•", id="instructions_tab"):
840
  gr.Markdown(
 
781
 
782
  result_table = gr.Dataframe(
783
  headers=["Name", "Address", "Location", "Price", "Cuisine", "Award", "Description"],
784
+ row_count=10,
785
+ col_count=7,
786
+ interactive=False,
787
  )
788
 
789
  def init_dropdowns():
 
819
  r['Price'], r['Cuisine'], r['Award'],
820
  r['Description']
821
  ])
822
+ if len(filtered) >= 10: # ์ตœ๋Œ€ 10๊ฐœ ๊ฒฐ๊ณผ๋กœ ์ œํ•œ
823
+ break
824
 
825
+ return filtered
826
  except FileNotFoundError:
827
  return [["ํŒŒ์ผ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค", "", "", "", "", "", "find.csv ํŒŒ์ผ์„ ํ™•์ธํ•ด์ฃผ์„ธ์š”"]]
828
 
 
837
  outputs=result_table
838
  )
839
 
840
+
841
+
842
  # ์‚ฌ์šฉ ๊ฐ€์ด๋“œ ํƒญ
843
  with gr.TabItem("์ด์šฉ ๋ฐฉ๋ฒ•", id="instructions_tab"):
844
  gr.Markdown(