Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamSupekar committed Oct 11, 2024
0 parents commit b781ed1
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

conda env create -f environment.yaml
Run above command to create virtual environment


uvicorn main:app --reload
to run webapp run above command
Binary file added __pycache__/main.cpython-312.pyc
Binary file not shown.
21 changes: 21 additions & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: visio_env
channels:
- defaults
dependencies:
- bzip2=1.0.8=h2bbff1b_6
- ca-certificates=2024.9.24=haa95532_0
- expat=2.6.3=h5da7b33_0
- libffi=3.4.4=hd77b12b_1
- openssl=3.0.15=h827c3e9_0
- pip=24.2=py312haa95532_0
- python=3.12.7=h14ffc60_0
- setuptools=75.1.0=py312haa95532_0
- sqlite=3.45.3=h2bbff1b_0
- tk=8.6.14=h0416ee5_0
- tzdata=2024b=h04d1e81_0
- vc=14.40=h2eaa2aa_1
- vs2015_runtime=14.40.33807=h98bb1dd_1
- wheel=0.44.0=py312haa95532_0
- xz=5.4.6=h8cc25b3_1
- zlib=1.2.13=h8cc25b3_1
prefix: C:\Users\OMEN\.conda\envs\visio_env
19 changes: 19 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from starlette.requests import Request

# Create the FastAPI app instance
app = FastAPI()

# Mount the "static" directory to serve CSS and other static files
app.mount("/static", StaticFiles(directory="static"), name="static")

# Create the Jinja2 templates object
templates = Jinja2Templates(directory="templates")

# Define a route for the home page
@app.get("/", response_class=HTMLResponse)
async def read_root(request: Request):
return templates.TemplateResponse("index.html", {"request": request})
63 changes: 63 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/* Global Styles */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #b6b5b5;
color: #333;
}

header {
background-color: #414a54;
color: white;
padding: 20px;
}

.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}

h1 {
margin: 0;
}

nav ul {
list-style: none;
padding: 0;
display: flex;
gap: 20px;
}

nav a {
color: white;
text-decoration: none;
font-weight: bold;
}

main {
padding: 40px;
text-align: center;
}

h2 {
font-size: 2em;
margin-bottom: 20px;
}

/* File Upload Section */
.file-upload-section {
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
}

input[type="file"], select {
margin: 10px 0;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
width: 50%;
}
39 changes: 39 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AlgoPlay</title>
<link rel="stylesheet" href="static\style.css">
</head>
<body>
<header>
<div class="header-content">
<h1>AlgoPlay</h1>
</div>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Learn</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
</header>

<main>
<section>
<h2>Linear Regression</h2>
<div class="file-upload-section">
<label for="file-upload">Upload Data File:</label>
<input type="file" id="file-upload">
<p>or select preloaded data:</p>
<select id="preloaded-data">
<option value="housing-data.csv">Housing Data</option>
<option value="user-data.csv">User Data</option>
</select>
</div>
</section>
</main>
</body>
</html>

0 comments on commit b781ed1

Please sign in to comment.