Remove old Postman collection and environment files; add new comprehensive Postman collection and environment for AI Lab API with updated endpoints and configurations.

This commit is contained in:
Cyril 2025-10-12 20:44:29 +02:00
parent 71c4ac879d
commit cf96dca64e
4 changed files with 10 additions and 38 deletions

View File

@ -1,37 +0,0 @@
#!/usr/bin/env python3
"""
Simple HTTP server to serve the UI files
"""
import http.server
import socketserver
import os
import webbrowser
from pathlib import Path
# Change to the ui directory
ui_dir = Path(__file__).parent / "ui"
os.chdir(ui_dir)
PORT = 3000
class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS')
self.send_header('Access-Control-Allow-Headers', 'Content-Type')
super().end_headers()
if __name__ == "__main__":
with socketserver.TCPServer(("", PORT), MyHTTPRequestHandler) as httpd:
print(f"🌐 Serving UI at http://localhost:{PORT}")
print(f"📁 Serving files from: {ui_dir.absolute()}")
print("💡 Make sure the API server is running on http://localhost:8000")
print("🔄 Press Ctrl+C to stop")
# Try to open browser
try:
webbrowser.open(f"http://localhost:{PORT}")
except:
pass
httpd.serve_forever()

View File

@ -56,7 +56,16 @@ app = FastAPI(
title="AI Lab API",
description="API for various AI/ML pipelines using transformers",
version="1.0.0",
lifespan=lifespan
lifespan=lifespan,
swagger_ui_parameters={
"defaultModelsExpandDepth": -1,
"syntaxHighlight.theme": "obsidian",
"tryItOutEnabled": True,
"requestSnippetsEnabled": True,
"persistAuthorization": True,
"displayRequestDuration": True,
"defaultModelRendering": "model"
}
)
# Add CORS middleware