show ip and back to orgiinal config

This commit is contained in:
mkozlowskiAzimuthe 2023-01-22 23:50:45 +01:00
parent 28104dd686
commit 8c6786c9cb

View File

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