joaomaruqes299 commited on
Commit
eb0895a
·
verified ·
1 Parent(s): 4115a7a

VALERIANOS

Browse files
Files changed (1) hide show
  1. 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()