Spaces:
Sleeping
Sleeping
File size: 1,262 Bytes
2de3cd3 8f72ba3 ec67f08 8929e00 8f72ba3 c9bd78a ec67f08 8f72ba3 8929e00 8f72ba3 58df46d ed835cc 8929e00 cc9d21c 811a74f 8f72ba3 b6d5172 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
from docs import generate_docs
import gradio as gr
DESCRIPTION = "GitHub Repo Documentation Generator"
# Define the Gradio Blocks interface.
with gr.Blocks(theme=gr.themes.Origin(primary_hue="red", secondary_hue="pink"), title="GitHub Repo Documentation Generator") as demo:
gr.HTML(
f"""<h1><span>{DESCRIPTION}</span></h1>""",
elem_id="title",
)
gr.Markdown(
"Enter a GitHub repository URL or ID (in the format `user/repo`) below. "
"This tool fetches repository details and uses the Groq API to generate documentation."
)
gr.Markdown("liek this spaces if this spaces helpfull")
with gr.Row():
repo_id_input = gr.Textbox(
label="GitHub Repository URL or ID",
)
generate_button = gr.Button("Generate Documentation")
output_box = gr.Textbox(
label="Generated Documentation",
lines=20,
interactive=True,
)
gr.Markdown("<div style='text-align: center;'>Made with ❤ by <a href='https://huggingface.co/theNeofr'>NeoPy</a></div>")
# When the button is clicked, call the generate_docs function.
generate_button.click(fn=generate_docs, inputs=repo_id_input, outputs=output_box)
# Launch the Gradio app.
demo.launch(debug=True) |