Commit ·
217053e
1
Parent(s): 40685b6
fix port
Browse files- app.py +3 -1
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
import requests
|
| 2 |
from flask import Flask, request, jsonify
|
|
|
|
| 3 |
from smart_search import SmartSearch
|
| 4 |
from tempfile import NamedTemporaryFile
|
| 5 |
|
| 6 |
app = Flask(__name__)
|
|
|
|
| 7 |
|
| 8 |
# Function to download data from API and save to a temporary file
|
| 9 |
def download_and_save_data(url: str) -> str:
|
|
@@ -44,4 +46,4 @@ def search():
|
|
| 44 |
return jsonify(results)
|
| 45 |
|
| 46 |
if __name__ == '__main__':
|
| 47 |
-
app.run(debug=
|
|
|
|
| 1 |
import requests
|
| 2 |
from flask import Flask, request, jsonify
|
| 3 |
+
from flask_cors import CORS
|
| 4 |
from smart_search import SmartSearch
|
| 5 |
from tempfile import NamedTemporaryFile
|
| 6 |
|
| 7 |
app = Flask(__name__)
|
| 8 |
+
CORS(app)
|
| 9 |
|
| 10 |
# Function to download data from API and save to a temporary file
|
| 11 |
def download_and_save_data(url: str) -> str:
|
|
|
|
| 46 |
return jsonify(results)
|
| 47 |
|
| 48 |
if __name__ == '__main__':
|
| 49 |
+
app.run(debug=False, host="0.0.0.0", port=7860)
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
Flask
|
|
|
|
| 2 |
fuzzywuzzy
|
| 3 |
python-Levenshtein
|
|
|
|
| 1 |
Flask
|
| 2 |
+
flask-cors
|
| 3 |
fuzzywuzzy
|
| 4 |
python-Levenshtein
|