Spaces:
Sleeping
Sleeping
sachin1801 commited on
Commit ·
921262c
1
Parent(s): f5bad7d
feat: add landing page with track selection and move input to /input
Browse files- Create landing page at / with hero section and three track cards
- Move prediction form from / to /input
- Add "Predict" link to navigation (desktop and mobile)
- Splicing Prediction card links to /input, other tracks show "Coming Soon"
webapp/app/main.py
CHANGED
|
@@ -122,8 +122,14 @@ app.include_router(api_router, prefix="/api", tags=["api"])
|
|
| 122 |
# HTML page routes
|
| 123 |
@app.get("/", response_class=HTMLResponse, include_in_schema=False)
|
| 124 |
async def home(request: Request):
|
| 125 |
-
"""Render the
|
| 126 |
-
return templates.TemplateResponse("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
|
| 129 |
@app.get("/result/{job_id}", response_class=HTMLResponse, include_in_schema=False)
|
|
|
|
| 122 |
# HTML page routes
|
| 123 |
@app.get("/", response_class=HTMLResponse, include_in_schema=False)
|
| 124 |
async def home(request: Request):
|
| 125 |
+
"""Render the landing page."""
|
| 126 |
+
return templates.TemplateResponse("landing.html", {"request": request, "settings": settings})
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
@app.get("/input", response_class=HTMLResponse, include_in_schema=False)
|
| 130 |
+
async def input_page(request: Request):
|
| 131 |
+
"""Render the input page for splicing prediction."""
|
| 132 |
+
return templates.TemplateResponse("input.html", {"request": request, "settings": settings})
|
| 133 |
|
| 134 |
|
| 135 |
@app.get("/result/{job_id}", response_class=HTMLResponse, include_in_schema=False)
|
webapp/templates/base.html
CHANGED
|
@@ -60,6 +60,9 @@
|
|
| 60 |
<a href="/" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md {% if request.url.path == '/' %}text-primary-600 bg-primary-50{% endif %}">
|
| 61 |
Home
|
| 62 |
</a>
|
|
|
|
|
|
|
|
|
|
| 63 |
<a href="/about" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md {% if request.url.path == '/about' %}text-primary-600 bg-primary-50{% endif %}">
|
| 64 |
About
|
| 65 |
</a>
|
|
@@ -95,6 +98,7 @@
|
|
| 95 |
<div class="hidden md:hidden" id="mobile-menu">
|
| 96 |
<div class="px-2 pt-2 pb-3 space-y-1">
|
| 97 |
<a href="/" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Home</a>
|
|
|
|
| 98 |
<a href="/about" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">About</a>
|
| 99 |
<a href="/methodology" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Methodology</a>
|
| 100 |
<a href="/help" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Help</a>
|
|
|
|
| 60 |
<a href="/" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md {% if request.url.path == '/' %}text-primary-600 bg-primary-50{% endif %}">
|
| 61 |
Home
|
| 62 |
</a>
|
| 63 |
+
<a href="/input" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md {% if request.url.path == '/input' %}text-primary-600 bg-primary-50{% endif %}">
|
| 64 |
+
Predict
|
| 65 |
+
</a>
|
| 66 |
<a href="/about" class="px-3 py-2 text-sm font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md {% if request.url.path == '/about' %}text-primary-600 bg-primary-50{% endif %}">
|
| 67 |
About
|
| 68 |
</a>
|
|
|
|
| 98 |
<div class="hidden md:hidden" id="mobile-menu">
|
| 99 |
<div class="px-2 pt-2 pb-3 space-y-1">
|
| 100 |
<a href="/" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Home</a>
|
| 101 |
+
<a href="/input" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Predict</a>
|
| 102 |
<a href="/about" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">About</a>
|
| 103 |
<a href="/methodology" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Methodology</a>
|
| 104 |
<a href="/help" class="block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50 rounded-md">Help</a>
|
webapp/templates/{index.html → input.html}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{% extends "base.html" %}
|
| 2 |
|
| 3 |
-
{% block title %}{{ settings.app_name }}
|
| 4 |
|
| 5 |
{% block content %}
|
| 6 |
<div class="max-w-4xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
|
|
|
|
| 1 |
{% extends "base.html" %}
|
| 2 |
|
| 3 |
+
{% block title %}Splicing Prediction - {{ settings.app_name }}{% endblock %}
|
| 4 |
|
| 5 |
{% block content %}
|
| 6 |
<div class="max-w-4xl mx-auto py-8 px-4 sm:px-6 lg:px-8">
|
webapp/templates/landing.html
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html" %}
|
| 2 |
+
|
| 3 |
+
{% block title %}{{ settings.app_name }} - Interpretable Splicing Prediction{% endblock %}
|
| 4 |
+
|
| 5 |
+
{% block content %}
|
| 6 |
+
<div class="max-w-6xl mx-auto py-12 px-4 sm:px-6 lg:px-8">
|
| 7 |
+
<!-- Hero Section -->
|
| 8 |
+
<div class="text-center mb-12">
|
| 9 |
+
<h1 class="text-4xl font-bold text-gray-900 mb-4">{{ settings.app_name }}</h1>
|
| 10 |
+
<p class="text-lg text-gray-600 max-w-3xl mx-auto">
|
| 11 |
+
ExonAI is a web server that enables users to input an exon sequence and examine how an
|
| 12 |
+
interpretable neural network predicts its splicing output (percent spliced in, PSI).
|
| 13 |
+
</p>
|
| 14 |
+
</div>
|
| 15 |
+
|
| 16 |
+
<!-- Track Cards -->
|
| 17 |
+
<div class="grid md:grid-cols-3 gap-6 mt-8">
|
| 18 |
+
<!-- Splicing Prediction - Active -->
|
| 19 |
+
<a href="/input" class="block bg-white rounded-lg shadow-sm border border-gray-200 p-6 hover:shadow-md hover:border-primary-300 transition-all">
|
| 20 |
+
<div class="flex items-center justify-center w-12 h-12 bg-primary-100 rounded-lg mb-4">
|
| 21 |
+
<svg class="w-6 h-6 text-primary-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 22 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
| 23 |
+
</svg>
|
| 24 |
+
</div>
|
| 25 |
+
<h3 class="text-lg font-semibold text-gray-900 mb-2">Splicing Prediction</h3>
|
| 26 |
+
<p class="text-sm text-gray-600">
|
| 27 |
+
Predict the percent spliced in (PSI) value for an exon sequence and visualize the model's interpretation.
|
| 28 |
+
</p>
|
| 29 |
+
</a>
|
| 30 |
+
|
| 31 |
+
<!-- Mutagenesis - Coming Soon -->
|
| 32 |
+
<div class="block bg-gray-50 rounded-lg border border-gray-200 p-6 opacity-75 cursor-not-allowed">
|
| 33 |
+
<div class="flex items-center justify-between mb-4">
|
| 34 |
+
<div class="flex items-center justify-center w-12 h-12 bg-gray-200 rounded-lg">
|
| 35 |
+
<svg class="w-6 h-6 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 36 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" />
|
| 37 |
+
</svg>
|
| 38 |
+
</div>
|
| 39 |
+
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">
|
| 40 |
+
Coming Soon
|
| 41 |
+
</span>
|
| 42 |
+
</div>
|
| 43 |
+
<h3 class="text-lg font-semibold text-gray-500 mb-2">Mutagenesis Prediction</h3>
|
| 44 |
+
<p class="text-sm text-gray-400">
|
| 45 |
+
Analyze how single nucleotide mutations affect splicing outcomes across your sequence.
|
| 46 |
+
</p>
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<!-- Exon Comparison - Coming Soon -->
|
| 50 |
+
<div class="block bg-gray-50 rounded-lg border border-gray-200 p-6 opacity-75 cursor-not-allowed">
|
| 51 |
+
<div class="flex items-center justify-between mb-4">
|
| 52 |
+
<div class="flex items-center justify-center w-12 h-12 bg-gray-200 rounded-lg">
|
| 53 |
+
<svg class="w-6 h-6 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 54 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" />
|
| 55 |
+
</svg>
|
| 56 |
+
</div>
|
| 57 |
+
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800">
|
| 58 |
+
Coming Soon
|
| 59 |
+
</span>
|
| 60 |
+
</div>
|
| 61 |
+
<h3 class="text-lg font-semibold text-gray-500 mb-2">Exon Comparison</h3>
|
| 62 |
+
<p class="text-sm text-gray-400">
|
| 63 |
+
Compare multiple exon sequences side-by-side to understand differences in predicted splicing behavior.
|
| 64 |
+
</p>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
{% endblock %}
|