Skip to content

Commit

Permalink
chore: change playground layout and interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lh0x00 committed Jan 14, 2025
1 parent 88c7429 commit f25b025
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions docsifer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def filter(self, record):
- **Open Source**: The entire Docsifer codebase is publicly available for review and contribution.
- **Efficient & Flexible**: Supports multiple file formats, ensuring quick and accurate Markdown conversion.
- **Privacy-Focused**: We never store user data; all processing is temporary. We only collect minimal anonymous usage statistics to count the number of calls and the number of tokens, nothing else.
- **Privacy-Focused**: We never store user data; all processing is temporary, with only minimal anonymous stats collected for call and token counts.
- **Production-Ready**: Easy Docker deployment, interactive Gradio playground, and comprehensive REST API documentation.
- **Community & Collaboration**: Contribute on [GitHub]({__metadata__["github"]}) or try it out on [Hugging Face Spaces]({__metadata__["spaces"]}).
Expand Down Expand Up @@ -329,24 +329,6 @@ def create_main_interface():

convert_btn = gr.Button("Convert")

# Right Column: Conversion Result Display & Download
with gr.Column():
# Display the result as Markdown
output_md = gr.Textbox(
label="Markdown Preview",
lines=30,
max_lines=50,
interactive=True,
show_copy_button=True,
)

# The user can still download the .md file
download_file = gr.File(
label="Download",
interactive=False,
visible=True,
)

gr.Markdown(
"""
### cURL Examples
Expand All @@ -371,6 +353,23 @@ def create_main_interface():
"""
)

# Right Column: Conversion Result Display & Download
with gr.Column():
# Display the result as Markdown
output_md = gr.Textbox(
label="Markdown Preview",
lines=30,
interactive=True,
show_copy_button=True,
)

# The user can still download the .md file
download_file = gr.File(
label="Download",
interactive=False,
visible=True,
)

# Callback function triggered by convert_btn.click
def on_convert(file_bytes, url_str, base_url, api_key, model_id, cleanup):
"""
Expand Down

0 comments on commit f25b025

Please sign in to comment.