from flask import Flask from flask_restful import Resource, Api import requests from io import BytesIO import base64 from wordcloud import WordCloud from flask_cors import CORS
app = Flask(__name__) api = Api(app) CORS(app)
base_url = 'http://192.168.1.146:8081'
classHelloWorld(Resource): defget(self, stuId): text = requests.get(base_url + "/fun/getStuAdviceToTeacher?stuId="+str(stuId)).json()['data'] return self.student_cloud_imgstr(text)