-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_api.py
More file actions
22 lines (17 loc) · 775 Bytes
/
run_api.py
File metadata and controls
22 lines (17 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Run script for the Stock Prediction API
import argparse
from src.api import start_api
def main():
"""
Main function to run the Stock Prediction API
"""
parser = argparse.ArgumentParser(description='Stock Price Prediction API')
parser.add_argument('--host', type=str, default='0.0.0.0', help='Host to run the API on')
parser.add_argument('--port', type=int, default=5000, help='Port to run the API on')
parser.add_argument('--debug', action='store_true', help='Run in debug mode')
args = parser.parse_args()
print(f"Starting Stock Prediction API on {args.host}:{args.port}")
print("Press Ctrl+C to stop the server")
start_api(host=args.host, port=args.port, debug=args.debug)
if __name__ == "__main__":
main()