Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- app.py +13 -0
- static/index.html +62 -0
app.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
|
|
| 1 |
from fastapi import FastAPI, HTTPException
|
|
|
|
| 2 |
from pydantic import BaseModel
|
| 3 |
from typing import Dict, Any
|
| 4 |
import uvicorn
|
|
@@ -8,6 +10,17 @@ from tasks.support_ticket import SupportTicketTask
|
|
| 8 |
from tasks.schedule_conflict import ScheduleConflictTask
|
| 9 |
|
| 10 |
app = FastAPI(title="WorkflowOps OpenEnv", version="1.0.0")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
TASKS = {
|
| 13 |
"email_triage": EmailTriageTask,
|
|
|
|
| 1 |
+
from fastapi.responses import RedirectResponse
|
| 2 |
from fastapi import FastAPI, HTTPException
|
| 3 |
+
from fastapi.staticfiles import StaticFiles
|
| 4 |
from pydantic import BaseModel
|
| 5 |
from typing import Dict, Any
|
| 6 |
import uvicorn
|
|
|
|
| 10 |
from tasks.schedule_conflict import ScheduleConflictTask
|
| 11 |
|
| 12 |
app = FastAPI(title="WorkflowOps OpenEnv", version="1.0.0")
|
| 13 |
+
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
@app.get("/")
|
| 17 |
+
async def root():
|
| 18 |
+
return RedirectResponse(url="/static/index.html")
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
@app.get("/web")
|
| 22 |
+
async def web():
|
| 23 |
+
return RedirectResponse(url="/static/index.html")
|
| 24 |
|
| 25 |
TASKS = {
|
| 26 |
"email_triage": EmailTriageTask,
|
static/index.html
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>WorkflowOps OpenEnv</title>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
</head>
|
| 9 |
+
<body class="bg-gradient-to-br from-slate-900 to-slate-800 min-h-screen text-white">
|
| 10 |
+
<div class="container mx-auto px-4 py-16 max-w-4xl">
|
| 11 |
+
<div class="text-center mb-12">
|
| 12 |
+
<h1 class="text-5xl font-bold mb-4 bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent">WorkflowOps</h1>
|
| 13 |
+
<h2 class="text-2xl text-slate-300 mb-6">OpenEnv Hackathon Submission</h2>
|
| 14 |
+
<div class="bg-green-900/30 border border-green-500 rounded-xl p-4 inline-block">
|
| 15 |
+
<span class="text-green-400 font-medium">✅ SYSTEM ONLINE - ALL TASKS READY</span>
|
| 16 |
+
</div>
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-12">
|
| 20 |
+
<div class="bg-slate-800/50 backdrop-blur border border-slate-700 rounded-xl p-6">
|
| 21 |
+
<h3 class="text-xl font-semibold mb-3 text-cyan-400">📧 Email Triage</h3>
|
| 22 |
+
<p class="text-slate-400 mb-4">Categorize incoming emails into priority buckets</p>
|
| 23 |
+
<code class="text-xs bg-slate-900 p-2 rounded block">POST /env/email_triage/reset</code>
|
| 24 |
+
</div>
|
| 25 |
+
|
| 26 |
+
<div class="bg-slate-800/50 backdrop-blur border border-slate-700 rounded-xl p-6">
|
| 27 |
+
<h3 class="text-xl font-semibold mb-3 text-cyan-400">🎫 Support Ticket</h3>
|
| 28 |
+
<p class="text-slate-400 mb-4">Prioritize and assign support tickets</p>
|
| 29 |
+
<code class="text-xs bg-slate-900 p-2 rounded block">POST /env/support_ticket/reset</code>
|
| 30 |
+
</div>
|
| 31 |
+
|
| 32 |
+
<div class="bg-slate-800/50 backdrop-blur border border-slate-700 rounded-xl p-6">
|
| 33 |
+
<h3 class="text-xl font-semibold mb-3 text-cyan-400">📅 Schedule Conflict</h3>
|
| 34 |
+
<p class="text-slate-400 mb-4">Resolve calendar scheduling conflicts</p>
|
| 35 |
+
<code class="text-xs bg-slate-900 p-2 rounded block">POST /env/schedule_conflict/reset</code>
|
| 36 |
+
</div>
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
<div class="bg-slate-800/50 backdrop-blur border border-slate-700 rounded-xl p-6 mb-8">
|
| 40 |
+
<h3 class="text-xl font-semibold mb-4">🔌 API Endpoints</h3>
|
| 41 |
+
<div class="space-y-3 font-mono text-sm">
|
| 42 |
+
<div class="flex justify-between p-2 bg-slate-900/50 rounded">
|
| 43 |
+
<span class="text-green-400">GET</span> <span>/health</span>
|
| 44 |
+
</div>
|
| 45 |
+
<div class="flex justify-between p-2 bg-slate-900/50 rounded">
|
| 46 |
+
<span class="text-green-400">GET</span> <span>/ready</span>
|
| 47 |
+
</div>
|
| 48 |
+
<div class="flex justify-between p-2 bg-slate-900/50 rounded">
|
| 49 |
+
<span class="text-blue-400">POST</span> <span>/env/{task}/reset</span>
|
| 50 |
+
</div>
|
| 51 |
+
<div class="flex justify-between p-2 bg-slate-900/50 rounded">
|
| 52 |
+
<span class="text-blue-400">POST</span> <span>/env/step</span>
|
| 53 |
+
</div>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
|
| 57 |
+
<div class="text-center text-slate-500 text-sm">
|
| 58 |
+
OpenEnv v1.0.0 | Hackathon 2026
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
</body>
|
| 62 |
+
</html>
|