Spaces:
Sleeping
Sleeping
Commit
•
15cb8f8
1
Parent(s):
7e92f73
big text
Browse files
app.py
CHANGED
@@ -37,16 +37,18 @@ def scrape_and_summarize(prompt, source):
|
|
37 |
with open("file.txt", "w") as file:
|
38 |
file.write(html.unescape(source))
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
50 |
|
51 |
|
52 |
# Gradio interface
|
|
|
37 |
with open("file.txt", "w") as file:
|
38 |
file.write(html.unescape(source))
|
39 |
|
40 |
+
with open("file.txt", "r") as file:
|
41 |
+
text = file.read()
|
42 |
+
return {"prompt": prompt}, {"source": text}
|
43 |
+
# smart_scraper_graph = SmartScraperGraph(
|
44 |
+
# prompt=prompt,
|
45 |
+
# source="file.txt",
|
46 |
+
# # source=source,
|
47 |
+
# config=graph_config
|
48 |
+
# )
|
49 |
+
# result = smart_scraper_graph.run()
|
50 |
+
# exec_info = smart_scraper_graph.get_execution_info()
|
51 |
+
# return result, prettify_exec_info(exec_info)
|
52 |
|
53 |
|
54 |
# Gradio interface
|
test.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from gradio_client import Client
|
2 |
import html
|
3 |
|
4 |
-
with open("
|
5 |
text = file.read()
|
6 |
|
7 |
client = Client("sadidul012/test-space")
|
|
|
1 |
from gradio_client import Client
|
2 |
import html
|
3 |
|
4 |
+
with open("file.txt", "r") as file:
|
5 |
text = file.read()
|
6 |
|
7 |
client = Client("sadidul012/test-space")
|