chore: change playground layout and interface
Browse files- docsifer/__init__.py +18 -19
docsifer/__init__.py
CHANGED
@@ -62,7 +62,7 @@ Welcome to **Docsifer**, a specialized service that converts your files—like P
|
|
62 |
|
63 |
- **Open Source**: The entire Docsifer codebase is publicly available for review and contribution.
|
64 |
- **Efficient & Flexible**: Supports multiple file formats, ensuring quick and accurate Markdown conversion.
|
65 |
-
- **Privacy-Focused**: We never store user data; all processing is temporary
|
66 |
- **Production-Ready**: Easy Docker deployment, interactive Gradio playground, and comprehensive REST API documentation.
|
67 |
- **Community & Collaboration**: Contribute on [GitHub]({__metadata__["github"]}) or try it out on [Hugging Face Spaces]({__metadata__["spaces"]}).
|
68 |
|
@@ -329,24 +329,6 @@ def create_main_interface():
|
|
329 |
|
330 |
convert_btn = gr.Button("Convert")
|
331 |
|
332 |
-
# Right Column: Conversion Result Display & Download
|
333 |
-
with gr.Column():
|
334 |
-
# Display the result as Markdown
|
335 |
-
output_md = gr.Textbox(
|
336 |
-
label="Markdown Preview",
|
337 |
-
lines=30,
|
338 |
-
max_lines=50,
|
339 |
-
interactive=True,
|
340 |
-
show_copy_button=True,
|
341 |
-
)
|
342 |
-
|
343 |
-
# The user can still download the .md file
|
344 |
-
download_file = gr.File(
|
345 |
-
label="Download",
|
346 |
-
interactive=False,
|
347 |
-
visible=True,
|
348 |
-
)
|
349 |
-
|
350 |
gr.Markdown(
|
351 |
"""
|
352 |
### cURL Examples
|
@@ -371,6 +353,23 @@ def create_main_interface():
|
|
371 |
"""
|
372 |
)
|
373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
# Callback function triggered by convert_btn.click
|
375 |
def on_convert(file_bytes, url_str, base_url, api_key, model_id, cleanup):
|
376 |
"""
|
|
|
62 |
|
63 |
- **Open Source**: The entire Docsifer codebase is publicly available for review and contribution.
|
64 |
- **Efficient & Flexible**: Supports multiple file formats, ensuring quick and accurate Markdown conversion.
|
65 |
+
- **Privacy-Focused**: We never store user data; all processing is temporary, with only minimal anonymous stats collected for call and token counts.
|
66 |
- **Production-Ready**: Easy Docker deployment, interactive Gradio playground, and comprehensive REST API documentation.
|
67 |
- **Community & Collaboration**: Contribute on [GitHub]({__metadata__["github"]}) or try it out on [Hugging Face Spaces]({__metadata__["spaces"]}).
|
68 |
|
|
|
329 |
|
330 |
convert_btn = gr.Button("Convert")
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
gr.Markdown(
|
333 |
"""
|
334 |
### cURL Examples
|
|
|
353 |
"""
|
354 |
)
|
355 |
|
356 |
+
# Right Column: Conversion Result Display & Download
|
357 |
+
with gr.Column():
|
358 |
+
# Display the result as Markdown
|
359 |
+
output_md = gr.Textbox(
|
360 |
+
label="Markdown Preview",
|
361 |
+
lines=30,
|
362 |
+
interactive=True,
|
363 |
+
show_copy_button=True,
|
364 |
+
)
|
365 |
+
|
366 |
+
# The user can still download the .md file
|
367 |
+
download_file = gr.File(
|
368 |
+
label="Download",
|
369 |
+
interactive=False,
|
370 |
+
visible=True,
|
371 |
+
)
|
372 |
+
|
373 |
# Callback function triggered by convert_btn.click
|
374 |
def on_convert(file_bytes, url_str, base_url, api_key, model_id, cleanup):
|
375 |
"""
|