Spaces:
Sleeping
Sleeping
import requests | |
url = "http://localhost:8000/upload/" # Flask uygulamasının adresi ve portu | |
# Gönderilecek dosyanın yolu | |
dosya_yolu = "test/test1.1.png" | |
# Dosyayı yükleme isteği oluştur | |
dosya = {"image": open(dosya_yolu, "rb")} | |
cevap = requests.post(url, files=dosya) | |
# Cevabı yazdır | |
print(cevap.json()) | |