AumCoreAI commited on
Commit
ee1ad42
·
verified ·
1 Parent(s): 8bf1b0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -28
app.py CHANGED
@@ -1,28 +1,18 @@
1
- # app.py - Main FastAPI Application
2
- import os
3
- import uvicorn
4
- from fastapi import FastAPI, Form
5
- from fastapi.responses import HTMLResponse, JSONResponse
6
- from fastapi.staticfiles import StaticFiles
7
- from ai_core import AICore
8
- from memory_db import MemoryDB
9
- from config import settings
10
-
11
- app = FastAPI()
12
- ai = AICore()
13
- db = MemoryDB()
14
-
15
- @app.get("/", response_class=HTMLResponse)
16
- async def home():
17
- return """<h1>AumCore AI - Coding Expert</h1>"""
18
-
19
- @app.post("/chat")
20
- async def chat(message: str = Form(...)):
21
- response = ai.generate_code_response(message)
22
- db.save_conversation(user_input=message, ai_response=response)
23
- return {"response": response}
24
-
25
- if __name__ == "__main__":
26
- uvicorn.run(app, host="0.0.0.0", port=7860)
27
-
28
- # Auto-updated: 1766656880.4008813
 
1
+ HTML_UI = '''
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>AumCore AI - Final Build</title>
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
10
+ <style>
11
+ /* Tumhara original CSS yaha aayega */
12
+ </style>
13
+ </head>
14
+ <body>
15
+ <!-- Tumhara original UI structure yaha aayega -->
16
+ </body>
17
+ </html>
18
+ '''