Owos commited on
Commit
81ec8c5
·
1 Parent(s): 8aaffa8

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -40,15 +40,16 @@ if uploaded_file is not None:
40
  # add a button
41
  run = st.button('Generate Art')
42
  if run==True:
43
- params = neural_style.TransferParams()
44
- params.gpu = "c"
45
- params.backend = "mkl"
46
- params.image_size = 128
47
- params.content_image = uploaded_file
48
- path = 'style'
49
- styles = os.listdir(path)
50
- params.style_image = random.choice(styles)
51
  with st.spinner('Wait for it...'):
 
 
 
 
 
 
 
 
52
  neural_style.transfer(params)
53
 
54
  #display image when done.
 
40
  # add a button
41
  run = st.button('Generate Art')
42
  if run==True:
43
+
 
 
 
 
 
 
 
44
  with st.spinner('Wait for it...'):
45
+ params = neural_style.TransferParams()
46
+ params.gpu = "c"
47
+ params.backend = "mkl"
48
+ params.image_size = 128
49
+ params.content_image = uploaded_file
50
+ path = 'styles'
51
+ styles = os.listdir(path)
52
+ params.style_image = random.choice(styles)
53
  neural_style.transfer(params)
54
 
55
  #display image when done.