diff --git a/single_eval.py b/single_eval.py index 30c368e..142e35b 100644 --- a/single_eval.py +++ b/single_eval.py @@ -5,10 +5,11 @@ from PIL import Image import time from fastapi import FastAPI, UploadFile, File import io -import os +import os +from sys import platform +image_size = [1920, 2560] print("Set up config") -image_size = [768, 1280] config_vision = VisionEncoderDecoderConfig.from_pretrained("Zombely/plwiki-proto-fine-tuned-v3.2") config_vision.encoder.image_size = image_size # (height, width) config_vision.decoder.max_length = 768 @@ -25,7 +26,10 @@ model.eval() model.to(device) print("Print ipconfig") -os.system("ipconfig") +if platform.linux: + os.system("ip r") +else: + os.system("ipconfig") print("Starting server") app = FastAPI()