Spaces:
Runtime error
Runtime error
new changes
Browse files- .DS_Store +0 -0
- Responses/amazon.json +0 -0
- Responses/facebook.json +0 -0
- Responses/google.json +0 -0
- Responses/semrush.json +0 -0
- Responses/upthrust.json +0 -0
- __pycache__/ask_questions.cpython-311.pyc +0 -0
- __pycache__/pagespeed.cpython-311.pyc +0 -0
- app.py +3 -3
- pagespeed.py +5 -2
- requirements.txt +18 -81
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
Responses/amazon.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
Responses/facebook.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
Responses/google.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
Responses/semrush.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
Responses/upthrust.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
__pycache__/ask_questions.cpython-311.pyc
DELETED
Binary file (3.83 kB)
|
|
__pycache__/pagespeed.cpython-311.pyc
DELETED
Binary file (4.38 kB)
|
|
app.py
CHANGED
@@ -40,7 +40,7 @@ if st.button("Get Report") or st.session_state.button:
|
|
40 |
|
41 |
with st.expander(title):
|
42 |
st.write(desc)
|
43 |
-
st.write(item)
|
44 |
if st.button("Fix Issue", key=index):
|
45 |
-
|
46 |
-
|
|
|
|
40 |
|
41 |
with st.expander(title):
|
42 |
st.write(desc)
|
|
|
43 |
if st.button("Fix Issue", key=index):
|
44 |
+
with st.spinner(text="Finding solution..."):
|
45 |
+
question = f"Title: {title}\nDescription: {desc}\nItem: {item}"
|
46 |
+
st.write(answer_question(df, question=issue["description"], debug=False))
|
pagespeed.py
CHANGED
@@ -48,12 +48,15 @@ def generate_response(website_url, url = "https://www.googleapis.com/pagespeedon
|
|
48 |
|
49 |
try:
|
50 |
#output_file_path = f"Responses/{name}.json"
|
51 |
-
|
52 |
-
|
|
|
|
|
53 |
response = requests.get(url, params=params)
|
54 |
response.raise_for_status() # Check for any request errors
|
55 |
|
56 |
data = response.json()
|
|
|
57 |
"""
|
58 |
with open(output_file_path, "w") as output_file:
|
59 |
json.dump(data, output_file, indent=4)
|
|
|
48 |
|
49 |
try:
|
50 |
#output_file_path = f"Responses/{name}.json"
|
51 |
+
if name not in st.session_state:
|
52 |
+
st.session_state[name] = {}
|
53 |
+
else:
|
54 |
+
return st.session_state[name]
|
55 |
response = requests.get(url, params=params)
|
56 |
response.raise_for_status() # Check for any request errors
|
57 |
|
58 |
data = response.json()
|
59 |
+
st.session_state[name] = data
|
60 |
"""
|
61 |
with open(output_file_path, "w") as output_file:
|
62 |
json.dump(data, output_file, indent=4)
|
requirements.txt
CHANGED
@@ -1,129 +1,66 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
cachetools==5.3.1
|
4 |
-
certifi==
|
5 |
-
|
6 |
-
charset-normalizer==2.0.12
|
7 |
click==8.1.3
|
8 |
-
|
9 |
-
configparser==5.3.0
|
10 |
-
contourpy==1.0.7
|
11 |
-
crayons==0.4.0
|
12 |
-
cryptography==37.0.2
|
13 |
-
cssselect==1.2.0
|
14 |
cycler==0.11.0
|
15 |
-
dataclasses-json==0.5.7
|
16 |
decorator==5.1.1
|
17 |
-
|
18 |
-
exceptiongroup==1.1.1
|
19 |
-
fake-headers==1.0.2
|
20 |
-
fake-useragent==1.1.3
|
21 |
-
filelock==3.12.0
|
22 |
-
fonttools==4.39.4
|
23 |
frozenlist==1.3.3
|
24 |
gitdb==4.0.10
|
25 |
GitPython==3.1.31
|
26 |
-
h11==0.14.0
|
27 |
-
h2==4.1.0
|
28 |
-
hpack==4.0.0
|
29 |
-
html5lib==1.1
|
30 |
-
hyperframe==6.0.1
|
31 |
idna==3.4
|
32 |
importlib-metadata==6.6.0
|
33 |
Jinja2==3.1.2
|
34 |
-
jmespath==1.0.1
|
35 |
joblib==1.2.0
|
36 |
jsonschema==4.17.3
|
37 |
-
kaitaistruct==0.10
|
38 |
kiwisolver==1.4.4
|
39 |
-
langchain==0.0.194
|
40 |
-
langchainplus-sdk==0.0.6
|
41 |
-
lxml==4.9.2
|
42 |
markdown-it-py==3.0.0
|
43 |
MarkupSafe==2.1.3
|
44 |
-
marshmallow==3.19.0
|
45 |
-
marshmallow-enum==1.5.1
|
46 |
matplotlib==3.7.1
|
47 |
mdurl==0.1.2
|
48 |
-
MechanicalSoup==1.2.0
|
49 |
multidict==6.0.4
|
50 |
-
|
51 |
-
|
52 |
-
numpy==1.24.2
|
53 |
-
openai==0.27.4
|
54 |
-
openapi-schema-pydantic==1.2.4
|
55 |
-
outcome==1.2.0
|
56 |
packaging==23.1
|
57 |
-
pandas==
|
58 |
-
parse==1.19.0
|
59 |
-
parsel==1.8.1
|
60 |
Pillow==9.5.0
|
61 |
-
platformdirs==3.5.1
|
62 |
plotly==5.15.0
|
63 |
protobuf==4.23.3
|
64 |
pyarrow==12.0.1
|
65 |
-
pyasn1==0.5.0
|
66 |
-
pycparser==2.21
|
67 |
-
pydantic==1.10.9
|
68 |
pydeck==0.8.1b0
|
69 |
-
pyee==8.2.2
|
70 |
Pygments==2.15.1
|
71 |
Pympler==1.0.1
|
72 |
-
pyOpenSSL==22.0.0
|
73 |
pyparsing==3.0.9
|
74 |
-
pyppeteer==1.0.2
|
75 |
-
pyquery==2.0.0
|
76 |
pyrsistent==0.19.3
|
77 |
-
PySocks==1.7.1
|
78 |
python-dateutil==2.8.2
|
79 |
-
python-socks==2.3.0
|
80 |
pytz==2023.3
|
81 |
pytz-deprecation-shim==0.1.0.post0
|
82 |
-
|
83 |
-
PyYAML==6.0
|
84 |
-
regex==2023.6.3
|
85 |
-
requests==2.27.1
|
86 |
-
requests-html==0.10.0
|
87 |
rich==13.4.2
|
88 |
scikit-learn==1.2.2
|
89 |
scipy==1.10.1
|
90 |
-
selectorlib==0.16.0
|
91 |
-
selenium==4.1.5
|
92 |
-
selenium-wire==5.1.0
|
93 |
six==1.16.0
|
94 |
-
sklearn==0.0.post5
|
95 |
-
sklearn3==0.0.1
|
96 |
smmap==5.0.0
|
97 |
-
sniffio==1.3.0
|
98 |
-
snscrape==0.6.2.20230320
|
99 |
-
sortedcontainers==2.4.0
|
100 |
soupsieve==2.4.1
|
101 |
-
SQLAlchemy==2.0.15
|
102 |
streamlit==1.23.1
|
103 |
tenacity==8.2.2
|
104 |
threadpoolctl==3.1.0
|
105 |
-
tiktoken==0.4.0
|
106 |
toml==0.10.2
|
107 |
toolz==0.12.0
|
108 |
tornado==6.3.2
|
109 |
tqdm==4.65.0
|
110 |
-
trio==0.22.0
|
111 |
-
trio-websocket==0.10.3
|
112 |
-
twitter-scraper==0.4.4
|
113 |
-
twitter-scraper-selenium==5.0.0
|
114 |
-
twitter-scraper-without-api==0.0.3
|
115 |
-
typing-inspect==0.9.0
|
116 |
typing_extensions==4.6.3
|
117 |
tzdata==2023.3
|
118 |
tzlocal==4.3
|
119 |
-
urllib3==
|
120 |
validators==0.20.0
|
121 |
-
|
122 |
-
|
123 |
-
webdriver-manager==3.2.2
|
124 |
-
webencodings==0.5.1
|
125 |
-
websockets==10.4
|
126 |
-
wsproto==1.2.0
|
127 |
-
yarl==1.8.2
|
128 |
-
zipp==3.8.0
|
129 |
-
zstandard==0.21.0
|
|
|
1 |
+
aiohttp==3.8.4
|
2 |
+
aiosignal==1.3.1
|
3 |
+
altair==5.0.1
|
4 |
+
async-timeout==4.0.2
|
5 |
+
attrs==23.1.0
|
6 |
+
beautifulsoup4==4.12.2
|
7 |
+
blinker==1.6.2
|
8 |
cachetools==5.3.1
|
9 |
+
certifi==2023.5.7
|
10 |
+
charset-normalizer==3.1.0
|
|
|
11 |
click==8.1.3
|
12 |
+
contourpy==1.1.0
|
|
|
|
|
|
|
|
|
|
|
13 |
cycler==0.11.0
|
|
|
14 |
decorator==5.1.1
|
15 |
+
fonttools==4.40.0
|
|
|
|
|
|
|
|
|
|
|
16 |
frozenlist==1.3.3
|
17 |
gitdb==4.0.10
|
18 |
GitPython==3.1.31
|
|
|
|
|
|
|
|
|
|
|
19 |
idna==3.4
|
20 |
importlib-metadata==6.6.0
|
21 |
Jinja2==3.1.2
|
|
|
22 |
joblib==1.2.0
|
23 |
jsonschema==4.17.3
|
|
|
24 |
kiwisolver==1.4.4
|
|
|
|
|
|
|
25 |
markdown-it-py==3.0.0
|
26 |
MarkupSafe==2.1.3
|
|
|
|
|
27 |
matplotlib==3.7.1
|
28 |
mdurl==0.1.2
|
|
|
29 |
multidict==6.0.4
|
30 |
+
numpy==1.24.3
|
31 |
+
openai==0.27.8
|
|
|
|
|
|
|
|
|
32 |
packaging==23.1
|
33 |
+
pandas==2.0.2
|
|
|
|
|
34 |
Pillow==9.5.0
|
|
|
35 |
plotly==5.15.0
|
36 |
protobuf==4.23.3
|
37 |
pyarrow==12.0.1
|
|
|
|
|
|
|
38 |
pydeck==0.8.1b0
|
|
|
39 |
Pygments==2.15.1
|
40 |
Pympler==1.0.1
|
|
|
41 |
pyparsing==3.0.9
|
|
|
|
|
42 |
pyrsistent==0.19.3
|
|
|
43 |
python-dateutil==2.8.2
|
|
|
44 |
pytz==2023.3
|
45 |
pytz-deprecation-shim==0.1.0.post0
|
46 |
+
requests==2.31.0
|
|
|
|
|
|
|
|
|
47 |
rich==13.4.2
|
48 |
scikit-learn==1.2.2
|
49 |
scipy==1.10.1
|
|
|
|
|
|
|
50 |
six==1.16.0
|
|
|
|
|
51 |
smmap==5.0.0
|
|
|
|
|
|
|
52 |
soupsieve==2.4.1
|
|
|
53 |
streamlit==1.23.1
|
54 |
tenacity==8.2.2
|
55 |
threadpoolctl==3.1.0
|
|
|
56 |
toml==0.10.2
|
57 |
toolz==0.12.0
|
58 |
tornado==6.3.2
|
59 |
tqdm==4.65.0
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
typing_extensions==4.6.3
|
61 |
tzdata==2023.3
|
62 |
tzlocal==4.3
|
63 |
+
urllib3==2.0.3
|
64 |
validators==0.20.0
|
65 |
+
yarl==1.9.2
|
66 |
+
zipp==3.15.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|