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

@ -6,9 +6,10 @@ import time
from fastapi import FastAPI, UploadFile, File
import io
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()