Button seems 'inactive'
Hi, Thanks for the video. The code does not return anything when clicking on the Find Named Entities Button. Is there anything missing in the code ?
Hi Philippe! I just found a fix for this, it might have to do with the CORS error in your browser.
To confirm you have this problem, run app.py in your IDE and try typing something into the textbox. After that, press F12 on your keyboard (for Firefox) and see if you see a red line that says "Cross-Origin Request Blocked".
If so, you have the same problem as me.
To fix it, add these two lines of code
- In your import statements, add
from flask_cors import CORS # Import CORS
- After your the
appvariable is assigned, add this line of code
CORS(app)
Save and run python app.py in your terminal. Hope this helps!
Inspired by this StackOverflow post: https://stackoverflow.com/questions/28461001/python-flask-cors-issue