Commit
·
2e1ae96
1
Parent(s):
3cfb1f9
Subindo arquivos3x
Browse files- app.py +11 -7
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -1,18 +1,22 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
import os
|
| 3 |
import shutil
|
| 4 |
-
|
| 5 |
-
import
|
| 6 |
-
import seaborn as sns
|
| 7 |
-
import numpy as np
|
| 8 |
-
import io
|
| 9 |
import torch
|
| 10 |
import torch.nn as nn
|
| 11 |
import torch.optim as optim
|
| 12 |
from torchvision import datasets, transforms, models
|
| 13 |
from torch.utils.data import DataLoader, random_split
|
| 14 |
from PIL import Image
|
| 15 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Modelos para seleção
|
| 18 |
model_dict = {
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import shutil
|
| 3 |
+
import joblib # Para salvar como .pkl
|
| 4 |
+
import gradio as gr
|
|
|
|
|
|
|
|
|
|
| 5 |
import torch
|
| 6 |
import torch.nn as nn
|
| 7 |
import torch.optim as optim
|
| 8 |
from torchvision import datasets, transforms, models
|
| 9 |
from torch.utils.data import DataLoader, random_split
|
| 10 |
from PIL import Image
|
| 11 |
+
import matplotlib.pyplot as plt
|
| 12 |
+
import seaborn as sns
|
| 13 |
+
import numpy as np
|
| 14 |
+
import io
|
| 15 |
+
from sklearn.metrics import classification_report, confusion_matrix
|
| 16 |
+
|
| 17 |
+
# Adicionando os comandos para instalar o protobuf-compiler
|
| 18 |
+
os.system('apt-get update')
|
| 19 |
+
os.system('apt-get install -y protobuf-compiler')
|
| 20 |
|
| 21 |
# Modelos para seleção
|
| 22 |
model_dict = {
|
requirements.txt
CHANGED
|
@@ -6,10 +6,11 @@ matplotlib==3.4.3
|
|
| 6 |
seaborn==0.11.2
|
| 7 |
Pillow==8.4.0
|
| 8 |
joblib==1.1.0
|
| 9 |
-
onnx==1.
|
| 10 |
onnx-tf==1.8.0
|
| 11 |
tensorflow==2.8.0
|
| 12 |
tensorflow-addons==0.16.1
|
| 13 |
tensorflowjs==3.18.0
|
| 14 |
Cython==0.29.24
|
| 15 |
protobuf==3.19.4
|
|
|
|
|
|
| 6 |
seaborn==0.11.2
|
| 7 |
Pillow==8.4.0
|
| 8 |
joblib==1.1.0
|
| 9 |
+
onnx==1.13.0
|
| 10 |
onnx-tf==1.8.0
|
| 11 |
tensorflow==2.8.0
|
| 12 |
tensorflow-addons==0.16.1
|
| 13 |
tensorflowjs==3.18.0
|
| 14 |
Cython==0.29.24
|
| 15 |
protobuf==3.19.4
|
| 16 |
+
|