Instructions to use lenawilli/SOE_Python_App with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use lenawilli/SOE_Python_App with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://lenawilli/SOE_Python_App") - Notebooks
- Google Colab
- Kaggle
File size: 928 Bytes
eb0895a | 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | import gradio as gr
import requests
from bs4 import BeautifulSoup
def gerar_artigo(url):
try:
html = requests.get(url).text
soup = BeautifulSoup(html, "html.parser")
texto = soup.get_text()
artigo = f"""
SEO Article Generated
Source URL:
{url}
Summary of Content:
{texto[:2000]}
Suggested SEO Structure
Title: Optimized Article Based on Source
H2 Introduction
Rewrite the introduction based on the extracted content.
H2 Main Topic
Explain the main ideas of the article.
H2 Additional Insights
Add more value and explanations.
H2 Conclusion
Summarize the topic and include final thoughts.
"""
return artigo
except:
return "Error reading URL"
interface = gr.Interface(
fn=gerar_artigo,
inputs="text",
outputs="text",
title="URL to SEO Article Generator",
description="Paste a URL and generate a new article structure."
)
interface.launch() |