Skip to content

Commit

Permalink
Merge pull request #46 from gobbledy-gook/patch2
Browse files Browse the repository at this point in the history
re-organized code
  • Loading branch information
gobbledy-gook authored Jun 24, 2023
2 parents 4ddc8eb + 69b4bb8 commit 3d44a26
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
export API_KEY=APIKEY
export MONGO=MONGOKEY
export MONGO_URI=MONGOURL
python3 server.py
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 4 additions & 4 deletions report_ai/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"persistent": false
},
"icons": {
"16": "icon.png",
"32": "icon.png",
"48": "icon.png",
"128": "icon.png"
"16": "assets/icon.png",
"32": "assets/icon.png",
"48": "assets/icon.png",
"128": "assets/icon.png"
},
"content_scripts": [
{
Expand Down
5 changes: 1 addition & 4 deletions report_ai/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,12 @@ function logger(result) {
};

btn2.onclick = async () => {
// fetching the summary from server
// alert("Loading...");
btn2.style.display = "none";
var Parent = document.getElementById("SummaryParent");
var gifParent = document.getElementById("loader");
gifParent.style.display = "flex";
let gif = document.createElement("img");
gif.src = "rotate-right.png";
gif.src = "assets/rotate-right.png";
gif.style.animation = "spin 1.5s linear infinite";
gif.style.width = "6%";
gifParent.appendChild(gif);
Expand Down Expand Up @@ -165,7 +163,6 @@ function saveEntry(rating, url) {
body: JSON.stringify(data),
})
.then((res) => {
// console.log("Request complete! response:", res);
return res.json(); // return the Promise from res.json()
})
.then((json) => {
Expand Down
8 changes: 4 additions & 4 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
cors = CORS(app)


gpt_neo_key = os.environ.get("GPTNEO", None)
headers = {"Authorization": gpt_neo_key}
MongoUri = os.environ.get("mongo_uri","mongodb+srv://admin:[email protected]/")
client = MongoClient(MongoUri, server_api=ServerApi("1"))
API_KEY = os.environ.get("GPTNEO", None)
headers = {"Authorization": API_KEY}
MONGO_URI = os.environ.get("mongo_uri","mongodb+srv://admin:[email protected]/")
client = MongoClient(MONGO_URI, server_api=ServerApi("1"))
try:
client.admin.command("ping")
print("Pinged your deployment. You successfully connected to MongoDB!")
Expand Down

0 comments on commit 3d44a26

Please sign in to comment.