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"""

{DESCRIPTION}

""", 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("
Made with ❤ by NeoPy
") # 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)