Skip to content

Commit

Permalink
fix demo url address
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Aug 2, 2024
1 parent 8b8ab28 commit a43d35d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions client/src/SetupPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ export const SetupPage = ({
const handleImageUpload = (images) => {
const extractedNames = images.map((image) => {
let src = image.preview || image.src
if (src.includes("http://annotate-lab.onrender.com")) {
if (src.includes("http://rocky-badlands-09400-2bb445641857.herokuapp.com")) {
src = src.replace(
"http://annotate-lab.onrender.com",
"https://annotate-lab.onrender.com",
"http://rocky-badlands-09400-2bb445641857.herokuapp.com",
"https://rocky-badlands-09400-2bb445641857.herokuapp.com",
)
}
const selectedClsList = "" || image.selectedClsList // Assuming 'cls' information is not present
Expand Down
18 changes: 9 additions & 9 deletions server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ def download_image_with_annotations():
# Docker container uses port 5000, so replace 5001 with 5000
if "127.0.0.1:5001" in image_url:
image_url = image_url.replace("127.0.0.1:5001", "127.0.0.1:5000")
elif "http://annotate-lab.onrender.com" in image_url:
elif "http://rocky-badlands-09400-2bb445641857.herokuapp.com" in image_url:
image_url = image_url.replace(
"http://annotate-lab.onrender.com",
"https://annotate-lab.onrender.com",
"http://rocky-badlands-09400-2bb445641857.herokuapp.com",
"https://rocky-badlands-09400-2bb445641857.herokuapp.com",
)

response = requests.get(image_url)
Expand Down Expand Up @@ -766,10 +766,10 @@ def get_image_annotations():
image_url = region.get("image-src")
if "127.0.0.1:5001" in image_url:
image_url = image_url.replace("127.0.0.1:5001", "127.0.0.1:5000")
elif "http://annotate-lab.onrender.com" in image_url:
elif "http://rocky-badlands-09400-2bb445641857.herokuapp.com" in image_url:
image_url = image_url.replace(
"http://annotate-lab.onrender.com",
"https://annotate-lab.onrender.com",
"http://rocky-badlands-09400-2bb445641857.herokuapp.com",
"https://rocky-badlands-09400-2bb445641857.herokuapp.com",
)
# Handle NaN values in regions
cleaned_regions = cleaned_regions = [
Expand Down Expand Up @@ -844,10 +844,10 @@ def download_image_mask():
image_url = image_url.replace(
"127.0.0.1:5001", "127.0.0.1:5000"
)
elif "http://annotate-lab.onrender.com" in image_url:
elif "http://rocky-badlands-09400-2bb445641857.herokuapp.com" in image_url:
image_url = image_url.replace(
"http://annotate-lab.onrender.com",
"https://annotate-lab.onrender.com",
"http://rocky-badlands-09400-2bb445641857.herokuapp.com",
"https://rocky-badlands-09400-2bb445641857.herokuapp.com",
)

response = requests.get(image_url)
Expand Down

0 comments on commit a43d35d

Please sign in to comment.