panditamey commited on
Commit
a4f3208
1 Parent(s): eee60b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,7 +13,7 @@ import lightgbm as lgb
13
  from PIL import Image
14
  from flask_cors import CORS, cross_origin
15
 
16
-
17
 
18
  app = Flask(__name__)
19
 
@@ -52,7 +52,9 @@ def upload_image():
52
  index = predictions.index(max_num)
53
  print(classes[index])
54
  os.remove(str(imag.filename))
55
- response = jsonify(output=classes[index])
 
 
56
  # response.headers.add('Access-Control-Allow-Origin', '*')
57
  # response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization')
58
  # response.headers.add('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS')
 
13
  from PIL import Image
14
  from flask_cors import CORS, cross_origin
15
 
16
+ import wikipedia as wiki
17
 
18
  app = Flask(__name__)
19
 
 
52
  index = predictions.index(max_num)
53
  print(classes[index])
54
  os.remove(str(imag.filename))
55
+ result = wiki.summary(classes[index])
56
+ response = jsonify(output=classes[index],desc = result)
57
+
58
  # response.headers.add('Access-Control-Allow-Origin', '*')
59
  # response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Authorization')
60
  # response.headers.add('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS')