#stuff necessary for testing from PIL import Image import requests from io import BytesIO import pandas as pd import numpy as np import matplotlib.pyplot as plt import json #test values to test graph making array = np.array([[3,3,3],[4,4,4]]) #save image to variable test url = "https://www.volks.co.jp/blog_nest/kobe/2020/1209_01.jpg" response = requests.get(url) img = Image.open(BytesIO(response.content)) img.save("test.png") #pass values to json data = array with open("transfer.json", "w") as file: json.dump(data, file)