SusiePHaltmann commited on
Commit
b743e81
·
1 Parent(s): 856e978

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -1,23 +1,23 @@
1
- import torch
2
  import streamlit as st
3
- from PIL import Image
4
- from megatron import MegatronLM, download_pretrained_model
5
-
6
- #@st.cache(allow_output_mutation=True) # this line is important! without it, the app will crash on first run after a restart.
7
- def load_model():
8
- model = MegatronLM.from_pretrained('google/megatron-lm-1b')
9
- return model.cuda()
10
 
11
-
 
 
12
 
13
-
 
 
 
14
 
15
-
16
 
17
- #@st.cache(allow_output_mutation=True) # this line is important! without it, the app will crash on first run after a restart.
18
 
19
- def load_image(filename):
20
 
21
- image = Image.open(filename).convert("RGB")
22
 
23
- return image
 
1
+ conda create -n env_pytorch python=3.6
2
  import streamlit as st
3
+ conda activate env_pytorch
4
+
 
 
 
 
 
5
 
6
+ import streamlit as st
7
+ from PIL import Image
8
+ import numpy as np
9
 
10
+ @st.cache(allow_output_mutation=True)
11
+ def load_tileset():
12
+ tileset = Image.open('nsmbwii_tileset.png')
13
+ return tileset
14
 
15
+ def main():
16
 
17
+ st.title('NSMBWII Tileset Generator')
18
 
19
+ input_tileset = load_tileset()
20
 
21
+ st.image(input_tileset, caption='Input Tileset', use_column_width=True)
22
 
23
+ tile_size = st.slider('Tile Size', min_value=8, max