import firebase_admin from firebase_admin import credentials from firebase_admin import db from firebase_admin import messaging import time import threading import pandas as pd import os import datetime from zipfile import ZipFile import json from numba import jit, cuda from google.cloud import storage import os from firebase_admin import db from get_mask import get_mask import cv2 import scipy.ndimage from google.oauth2 import service_account import datetime import traceback from datetime import date # Open the JSON file with open('Downloads/field_data_with_palm_tree_count.json', 'r') as file: # Parse the JSON data data = json.load(file) try: pd.DataFrame(data).to_excel(('Downloads/new_gavl.xlsx')) except: pd.DataFrame(data).to_csv(('Downloads/gavl.csv'))