ai_article_writer_web_ui/webui.py
2024-02-17 22:04:06 +03:30

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)