siddhartharya commited on
Commit
28b1e54
·
verified ·
1 Parent(s): f745765

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -87,7 +87,7 @@ def process_uploaded_file(file):
87
  if file is None:
88
  return "Please upload a bookmarks HTML file."
89
 
90
- # Since 'file' is now bytes, decode it directly
91
  file_content = file.decode('utf-8')
92
  bookmarks = parse_bookmarks(file_content)
93
 
@@ -153,7 +153,7 @@ def build_app():
153
  gr.Markdown("# Bookmark Manager App")
154
 
155
  with gr.Tab("Upload and Process Bookmarks"):
156
- upload = gr.File(label="Upload Bookmarks HTML File", type='bytes') # Updated here
157
  process_button = gr.Button("Process Bookmarks")
158
  output_text = gr.Textbox(label="Output")
159
 
 
87
  if file is None:
88
  return "Please upload a bookmarks HTML file."
89
 
90
+ # Decode the binary data to a string
91
  file_content = file.decode('utf-8')
92
  bookmarks = parse_bookmarks(file_content)
93
 
 
153
  gr.Markdown("# Bookmark Manager App")
154
 
155
  with gr.Tab("Upload and Process Bookmarks"):
156
+ upload = gr.File(label="Upload Bookmarks HTML File", type='binary') # Updated here
157
  process_button = gr.Button("Process Bookmarks")
158
  output_text = gr.Textbox(label="Output")
159