ISYS commited on
Commit
8a24814
1 Parent(s): 2e48875
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -8,17 +8,18 @@ model = from_pretrained_keras("ISYS/MyNewModel")
8
  def greet(img):
9
  img = np.expand_dims(img, axis=0)
10
  #return np.argmax(model.predict(img)[0])
11
- numb = np.argmax(model.predict(img)[0])
12
- return numb % 3
 
13
 
14
  def rasp_numb(img):
15
  img = np.expand_dims(img, axis=0)
16
  return np.argmax(model.predict(img)[0])
17
 
 
 
 
 
18
 
19
- output1 = gr.outputs.Text((np.argmax(model.predict(img)[0])% 3) )
20
-
21
- output2 = gr.outputs.Text(np.argmax(model.predict(img)[0]))
22
-
23
- demo = gr.Interface(fn=greet, inputs="sketchpad", outputs=[output1, output2])
24
  demo.launch()
 
8
  def greet(img):
9
  img = np.expand_dims(img, axis=0)
10
  #return np.argmax(model.predict(img)[0])
11
+ numb = np.argmax(model.predict(img)[0]
12
+ a = numb % 3
13
+ return a, numb
14
 
15
  def rasp_numb(img):
16
  img = np.expand_dims(img, axis=0)
17
  return np.argmax(model.predict(img)[0])
18
 
19
+ outputs = [
20
+ gr.Textbox(label="hexadecimal color"),
21
+ gr.Textbox(label="hexadecimal color")
22
+ ]
23
 
24
+ demo = gr.Interface(fn=greet, inputs="sketchpad", output=outputs)
 
 
 
 
25
  demo.launch()