Spaces:
Running
Running
Update app.py
Browse files
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 |
-
#
|
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='
|
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 |
|