Sleepyp00 commited on
Commit
14fdc9e
·
1 Parent(s): 684442f
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -1,9 +1,7 @@
1
  import gradio as gr
2
- #from gradio.components import inputs
3
  from PIL import Image
4
  import requests
5
  import hopsworks
6
- import io
7
  import joblib
8
  import pandas as pd
9
 
@@ -31,7 +29,6 @@ def wine(volatile_acidity,
31
  res = model.predict(df)
32
  # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
33
  # the first element.
34
- # print("Res: {0}").format(res)
35
  print(res[0])
36
  wine_url = "https://github.com/jordicotxet/id2223/blob/63fe7d525afa1cfb626c9fa7513e2cc886e22d41/Wine/wine_dataset/" + str(int(res[0])) + ".jpg?raw=true"
37
  print(wine_url)
@@ -53,5 +50,5 @@ demo = gr.Interface(
53
  examples=[[0.5, 0.8, 0.034, 46, 9.2],[0.42, 4.1, 0.03, 31, 12.8], [0.7, 67.1, 0.219, 275, 12.9]],
54
  outputs=gr.Image(type="pil", height=400, width=400))
55
 
56
- demo.launch(debug=True)
57
 
 
1
  import gradio as gr
 
2
  from PIL import Image
3
  import requests
4
  import hopsworks
 
5
  import joblib
6
  import pandas as pd
7
 
 
29
  res = model.predict(df)
30
  # We add '[0]' to the result of the transformed 'res', because 'res' is a list, and we only want
31
  # the first element.
 
32
  print(res[0])
33
  wine_url = "https://github.com/jordicotxet/id2223/blob/63fe7d525afa1cfb626c9fa7513e2cc886e22d41/Wine/wine_dataset/" + str(int(res[0])) + ".jpg?raw=true"
34
  print(wine_url)
 
50
  examples=[[0.5, 0.8, 0.034, 46, 9.2],[0.42, 4.1, 0.03, 31, 12.8], [0.7, 67.1, 0.219, 275, 12.9]],
51
  outputs=gr.Image(type="pil", height=400, width=400))
52
 
53
+ demo.launch(share = True)
54