Sophie98 commited on
Commit
f496440
β€’
1 Parent(s): f6357b6

try to fix error

Browse files
Files changed (2) hide show
  1. app.py +6 -12
  2. requirements.txt +1 -1
app.py CHANGED
@@ -112,21 +112,15 @@ def style_sofa(input_img: np.ndarray, style_img: np.ndarray):
112
  print('Finishing job', id)
113
  return new_sofa
114
 
115
- image = gr.inputs.Image()
116
- style = gr.inputs.Image()
117
-
118
- # Examples
119
- example1 = ['sofa_example1.jpg','style_example1.jpg']
120
- example2 = ['sofa_example1.jpg','style_example2.jpg']
121
- example3 = ['sofa_example1.jpg','style_example3.jpg']
122
- example4 = ['sofa_example1.jpg','style_example4.jpg']
123
- example5 = ['sofa_example1.jpg','style_example5.jpg']
124
-
125
  demo = gr.Interface(
126
  style_sofa,
127
- inputs = [image,style],
128
  outputs = 'image',
129
- examples= [example1, example2, example3 ,example4 ,example5],
 
 
 
 
130
  title="πŸ›‹ Style your sofa πŸ›‹ ",
131
  description="Customize your sofa to your wildest dreams πŸ’­!\
132
  \nProvide a picture of your sofa and a desired pattern\
 
112
  print('Finishing job', id)
113
  return new_sofa
114
 
 
 
 
 
 
 
 
 
 
 
115
  demo = gr.Interface(
116
  style_sofa,
117
+ inputs = [gr.inputs.Image(),gr.inputs.Image()],
118
  outputs = 'image',
119
+ examples= [['sofa_example1.jpg','style_example1.jpg'],
120
+ ['sofa_example1.jpg','style_example2.jpg'],
121
+ ['sofa_example1.jpg','style_example3.jpg'],
122
+ ['sofa_example1.jpg','style_example4.jpg'],
123
+ ['sofa_example1.jpg','style_example5.jpg']],
124
  title="πŸ›‹ Style your sofa πŸ›‹ ",
125
  description="Customize your sofa to your wildest dreams πŸ’­!\
126
  \nProvide a picture of your sofa and a desired pattern\
requirements.txt CHANGED
@@ -9,7 +9,7 @@ gradio
9
 
10
  segmentation_models
11
  opencv-python-headless
12
- tensorflow-cpu
13
  tensorflow_hub
14
 
15
  paddlepaddle
 
9
 
10
  segmentation_models
11
  opencv-python-headless
12
+ tensorflow
13
  tensorflow_hub
14
 
15
  paddlepaddle