|
|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
from flask import Flask, request, jsonify
|
|
|
|
|
from dotenv import dotenv_values
|
|
|
|
|
from common.runtime import load_root_env, validate_env, as_int, as_str
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
from Model import Model
|
|
|
|
|
import numpy as np
|
|
|
|
|
@ -12,9 +14,13 @@ import asyncio
|
|
|
|
|
import shutil
|
|
|
|
|
import json
|
|
|
|
|
import gc
|
|
|
|
|
import os
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
TORCHSIG_PATH = "/app/torchsig"
|
|
|
|
|
if TORCHSIG_PATH not in sys.path:
|
|
|
|
|
# Ensure import torchsig resolves to /app/torchsig/torchsig package.
|
|
|
|
|
sys.path.insert(0, TORCHSIG_PATH)
|
|
|
|
|
|
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
@ -115,7 +121,10 @@ def receive_data():
|
|
|
|
|
result_msg = {}
|
|
|
|
|
data_to_send = {}
|
|
|
|
|
prediction_list = []
|
|
|
|
|
#print(model_list)
|
|
|
|
|
for model in model_list:
|
|
|
|
|
#print(str(freq))
|
|
|
|
|
#print(model.get_model_name())
|
|
|
|
|
if str(freq) in model.get_model_name():
|
|
|
|
|
print('-' * 100)
|
|
|
|
|
print(str(model))
|
|
|
|
|
|