diff --git a/agri.py b/agri.py index 4809fde..9ac5341 100644 --- a/agri.py +++ b/agri.py @@ -3,7 +3,7 @@ import os # Define the path to the folder where the screenshots are moved -folder_path = os.path.expanduser("/Users/aman/AgriVision/working images") +folder_path = os.path.expanduser("images") # Loop through all files in the folder for filename in os.listdir(folder_path): diff --git a/finale.r b/finale.r index 8a2a775..46b2045 100644 --- a/finale.r +++ b/finale.r @@ -3,7 +3,7 @@ library(reticulate) library(png) # Activate the Python environment -use_python("/Library/Frameworks/Python.framework/Versions/3.11/bin/python3") +use_python("~/miniconda3/envs/r-reticulate/bin/python") # Define the paths to the Python scripts map_path <- "map.py" @@ -131,9 +131,9 @@ server <- function(input, output) { #to show location details output$Location_output <- renderText({ - if (file.size("/Users/aman/AgriVision/media/location.txt")>0){ + if (file.size("media/location.txt")>0){ - Location_file_read <- read.delim("/Users/aman/AgriVision/media/location.txt", header = TRUE, sep = "\n") # nolint + Location_file_read <- read.delim("media/location.txt", header = TRUE, sep = "\n") # nolint paste(toString(Location_file_read)) } @@ -142,9 +142,9 @@ server <- function(input, output) { #to show climate attributes output$Attributes_output <- renderText({ - if (file.size("/Users/aman/AgriVision/media/attributes.txt")>0){ + if (file.size("media/attributes.txt")>0){ - Attribute_file_read <- read.delim("/Users/aman/AgriVision/media/attributes.txt", header = TRUE, sep = "\n") # nolint + Attribute_file_read <- read.delim("media/attributes.txt", header = TRUE, sep = "\n") # nolint paste(toString(Attribute_file_read)) } @@ -174,11 +174,11 @@ server <- function(input, output) { observeEvent(input$clear_images, { # Get a list of all the files in the directory - files <- list.files("/Users/aman/AgriVision/working images") + files <- list.files("working images") # Remove each file one by one for (file in files) { - file.remove(paste0("/Users/aman/AgriVision/working images", file)) + file.remove(paste0("working images", file)) } # Clear the image plots diff --git a/migrate.py b/migrate.py index bd78c77..031f063 100644 --- a/migrate.py +++ b/migrate.py @@ -3,7 +3,7 @@ # Define the source and destination paths desktop_path = os.path.expanduser("~/Desktop") -destination_path = os.path.expanduser("/Users/aman/AgriVision/working images") +destination_path = os.path.expanduser("images") # Create the destination folder if it doesn't exist if not os.path.exists(destination_path): diff --git a/panchromatic-sharpening.ipynb b/panchromatic-sharpening.ipynb index c10b0c5..b32331a 100644 --- a/panchromatic-sharpening.ipynb +++ b/panchromatic-sharpening.ipynb @@ -85,8 +85,8 @@ "# read m and p data\n", "IM_ID = '6120_2_2'\n", "\n", - "m = tiff.imread('/Users/aman/Downloads/sixteen_band/6120_2_2_M.tif')\n", - "pan = tiff.imread('/Users/aman/Downloads/sixteen_band/6120_2_2_P.tif')\n", + "m = tiff.imread('sixteen_band/6120_2_2_M.tif')\n", + "pan = tiff.imread('sixteen_band/6120_2_2_P.tif')\n", "\n", "\n", "\n",