AlekseyKorshuk commited on
Commit
5f49372
1 Parent(s): dd4ca7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -16,12 +16,13 @@ from huggan.pytorch.cyclegan.modeling_cyclegan import GeneratorResNet
16
  from torchvision import transforms as T
17
  from torchvision.transforms import Compose, Resize, ToTensor, Normalize, RandomCrop, RandomHorizontalFlip
18
  from torchvision.utils import make_grid
 
19
 
20
  hfapi = HfApi()
21
  model_names = [model.modelId[model.modelId.index("/") + 1:] for model in hfapi.list_models(author="huggingnft")]
22
 
23
  # streamlit-option-menu
24
- # st.set_page_config(page_title="Sharone's Streamlit App Gallery", page_icon="", layout="wide")
25
 
26
  # sysmenu = '''
27
  # <style>
@@ -116,8 +117,9 @@ st.sidebar.markdown(
116
  )
117
 
118
  if choose == "About":
119
- st.title(choose)
120
- st.markdown(ABOUT_TEXT)
 
121
 
122
  if choose == "Contact":
123
  st.title(choose)
@@ -225,7 +227,6 @@ if choose == "Collection2Collection":
225
  Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
226
  ])
227
 
228
- # generator = modeling_dcgan.Generator.from_pretrained("huggingnft/cryptopunks")
229
  with st.spinner(text=f"Downloading selected model..."):
230
  translator = GeneratorResNet.from_pretrained(f'huggingnft/{model_name}',
231
  input_shape=(n_channels, image_size, image_size),
 
16
  from torchvision import transforms as T
17
  from torchvision.transforms import Compose, Resize, ToTensor, Normalize, RandomCrop, RandomHorizontalFlip
18
  from torchvision.utils import make_grid
19
+ import requests
20
 
21
  hfapi = HfApi()
22
  model_names = [model.modelId[model.modelId.index("/") + 1:] for model in hfapi.list_models(author="huggingnft")]
23
 
24
  # streamlit-option-menu
25
+ # st.set_page_config(page_title="Streamlit App Gallery", page_icon="", layout="wide")
26
 
27
  # sysmenu = '''
28
  # <style>
 
117
  )
118
 
119
  if choose == "About":
120
+ README = requests.get("https://raw.githubusercontent.com/AlekseyKorshuk/huggingnft/main/README.md").text
121
+ # st.title(choose)
122
+ st.markdown(README)
123
 
124
  if choose == "Contact":
125
  st.title(choose)
 
227
  Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
228
  ])
229
 
 
230
  with st.spinner(text=f"Downloading selected model..."):
231
  translator = GeneratorResNet.from_pretrained(f'huggingnft/{model_name}',
232
  input_shape=(n_channels, image_size, image_size),