22 lines
547 B
Python
22 lines
547 B
Python
import gradio as gr
|
|
|
|
|
|
def write_article(url):
|
|
# Your logic to fetch HTML content from the URL
|
|
# Replace this with your actual implementation
|
|
html_content = f"<h1>Sample HTML Content for {url}</h1>"
|
|
return html_content
|
|
|
|
|
|
# Define the Gradio interface
|
|
iface = gr.Interface(
|
|
fn=write_article,
|
|
inputs="text", # Text input for the URL
|
|
outputs="html", # Display HTML content
|
|
title="URL to HTML Converter",
|
|
description="Enter a URL to get its HTML content."
|
|
)
|
|
|
|
# Launch the Gradio app
|
|
iface.launch(server_port=7373)
|