Spaces:
Runtime error
Runtime error
Commit
·
b743e81
1
Parent(s):
856e978
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
|
2 |
import streamlit as st
|
3 |
-
|
4 |
-
|
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 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
|
|
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
|