This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import json | |
import uuid | |
import uvicorn | |
from fastapi import FastAPI, File, UploadFile | |
from PIL import Image | |
from starlette.responses import Response | |
from model.dcgan import dcgan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import requests | |
import streamlit as st | |
from PIL import Image | |
server_url=f"http://backend:8088/pgan" | |
def pgan(): | |
st.title("PGAN - Progressive Growing of GANS") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torchvision.transforms as Transforms | |
use_gpu = True if torch.cuda.is_available() else False | |
# trained on high-quality celebrity faces "celebA" dataset | |
# this model outputs 512 x 512 pixel images | |
model = torch.hub.load('facebookresearch/pytorch_GAN_zoo:hub', | |
'PGAN', model_name='celebAHQ-512', | |
pretrained=True, useGPU=use_gpu) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import requests | |
import streamlit as st | |
from PIL import Image | |
server_url=f"http://backend:8088/dcgan" | |
def dcgan(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torchvision.transforms as Transforms | |
use_gpu = True if torch.cuda.is_available() else False | |
model = torch.hub.load('facebookresearch/pytorch_GAN_zoo:hub', 'DCGAN', pretrained=True, useGPU=use_gpu) | |
num_images = 1 | |
def dcgan(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import requests | |
import streamlit as st | |
from PIL import Image | |
server_url=f"http://backend:8088/resnext" | |
def resnext(): | |
st.title("RESNEXT - Next generation ResNets, more efficient and accurate") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torchvision.transforms as Transforms | |
# Read the categories | |
with open("imagenet_classes.txt", "r") as f: | |
categories = [s.strip() for s in f.readlines()] | |
model = torch.hub.load('pytorch/vision:v0.6.0', 'resnext50_32x4d', pretrained=True) | |
# or | |
# model = torch.hub.load('pytorch/vision:v0.6.0', 'resnext101_32x8d', pretrained=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
if [ "$DEBUG" = true ] ; then | |
echo 'Debugging - ON' | |
nodemon --exec streamlit run main.py | |
else | |
echo 'Debugging - OFF' | |
streamlit run main.py | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
if [ "$DEBUG" = true ] ; then | |
echo 'Debugging - ON' | |
uvicorn main:app --host 0.0.0.0 --port 8088 --reload | |
else | |
echo 'Debugging - OFF' | |
uvicorn main:app --host 0.0.0.0 --port 8088 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
if exists('g:no_vim_fancy_text') || !has('conceal') || &enc != 'utf-8' | |
finish | |
endif | |
syntax match rsFancyOperator "!=" conceal cchar=≠ | |
syntax match rsFancyOperator "<=" conceal cchar=≤ | |
syntax match rsFancyOperator ">=" conceal cchar=≥ | |
syntax match rsFancyOperator "<<" conceal cchar=« |