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
VALERIANOS
#2
by joaomaruqes299 - opened
- Blogreverse +51 -0
Blogreverse
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import requests
|
| 3 |
+
from bs4 import BeautifulSoup
|
| 4 |
+
|
| 5 |
+
def gerar_artigo(url):
|
| 6 |
+
try:
|
| 7 |
+
html = requests.get(url).text
|
| 8 |
+
soup = BeautifulSoup(html, "html.parser")
|
| 9 |
+
|
| 10 |
+
texto = soup.get_text()
|
| 11 |
+
|
| 12 |
+
artigo = f"""
|
| 13 |
+
SEO Article Generated
|
| 14 |
+
|
| 15 |
+
Source URL:
|
| 16 |
+
{url}
|
| 17 |
+
|
| 18 |
+
Summary of Content:
|
| 19 |
+
|
| 20 |
+
{texto[:2000]}
|
| 21 |
+
|
| 22 |
+
Suggested SEO Structure
|
| 23 |
+
|
| 24 |
+
Title: Optimized Article Based on Source
|
| 25 |
+
|
| 26 |
+
H2 Introduction
|
| 27 |
+
Rewrite the introduction based on the extracted content.
|
| 28 |
+
|
| 29 |
+
H2 Main Topic
|
| 30 |
+
Explain the main ideas of the article.
|
| 31 |
+
|
| 32 |
+
H2 Additional Insights
|
| 33 |
+
Add more value and explanations.
|
| 34 |
+
|
| 35 |
+
H2 Conclusion
|
| 36 |
+
Summarize the topic and include final thoughts.
|
| 37 |
+
"""
|
| 38 |
+
return artigo
|
| 39 |
+
|
| 40 |
+
except:
|
| 41 |
+
return "Error reading URL"
|
| 42 |
+
|
| 43 |
+
interface = gr.Interface(
|
| 44 |
+
fn=gerar_artigo,
|
| 45 |
+
inputs="text",
|
| 46 |
+
outputs="text",
|
| 47 |
+
title="URL to SEO Article Generator",
|
| 48 |
+
description="Paste a URL and generate a new article structure."
|
| 49 |
+
)
|
| 50 |
+
|
| 51 |
+
interface.launch()
|