Spaces:
Sleeping
Sleeping
fahadcr14
commited on
Commit
·
2f04f40
1
Parent(s):
161b59d
clean
Browse files- .github/workflows/main.yml +0 -23
- .gitignore +0 -0
- Dockerfile +0 -20
- README.md +0 -13
- app.py +0 -23
- requirements.txt +0 -17
- templates/index.html +0 -12
.github/workflows/main.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
name: Sync to Hugging Face hub
|
2 |
-
on:
|
3 |
-
push:
|
4 |
-
branches: [main]
|
5 |
-
|
6 |
-
# to run this workflow manually from the Actions tab
|
7 |
-
workflow_dispatch:
|
8 |
-
|
9 |
-
jobs:
|
10 |
-
sync-to-hub:
|
11 |
-
runs-on: ubuntu-latest
|
12 |
-
steps:
|
13 |
-
- uses: actions/checkout@v2
|
14 |
-
with:
|
15 |
-
fetch-depth: 0
|
16 |
-
- name: Add remote
|
17 |
-
env:
|
18 |
-
HF: ${{ secrets.HF_TOKEN }}
|
19 |
-
run: git remote add space https://fahd9999:[email protected]/spaces/fahd9999/resultprediction
|
20 |
-
- name: Push to hub #
|
21 |
-
env:
|
22 |
-
HF: ${{ secrets.HF_TOKEN }}
|
23 |
-
run: git push --force https://fahd9999:[email protected]/spaces/fahd9999/resultprediction main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitignore
DELETED
File without changes
|
Dockerfile
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
# Use a lightweight Python base image
|
2 |
-
FROM python:3.8-slim
|
3 |
-
|
4 |
-
# Set environment variables
|
5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
-
ENV PYTHONUNBUFFERED=1
|
7 |
-
|
8 |
-
# Install dependencies
|
9 |
-
WORKDIR /app
|
10 |
-
COPY requirements.txt /app/
|
11 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
-
|
13 |
-
# Copy app files
|
14 |
-
COPY . /app
|
15 |
-
|
16 |
-
# Expose the port Flask will run on
|
17 |
-
EXPOSE 7860
|
18 |
-
|
19 |
-
# Run the Flask app
|
20 |
-
CMD ["python", "app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
|
2 |
-
# mlactions
|
3 |
-
|
4 |
-
---
|
5 |
-
title: {{title}}
|
6 |
-
emoji: {{emoji}}
|
7 |
-
colorFrom: {{colorFrom}}
|
8 |
-
colorTo: {{colorTo}}
|
9 |
-
sdk: {{sdk}}
|
10 |
-
sdk_version: "{{sdkVersion}}"
|
11 |
-
app_file: app.py
|
12 |
-
pinned: false
|
13 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.py
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
from flask import Flask, request, jsonify, render_template
|
2 |
-
|
3 |
-
app = Flask(__name__)
|
4 |
-
|
5 |
-
# Route for the home page
|
6 |
-
@app.route('/')
|
7 |
-
def index():
|
8 |
-
return render_template('index.html')
|
9 |
-
|
10 |
-
# Prediction endpoint (mock prediction for now)
|
11 |
-
@app.route('/predict', methods=['POST'])
|
12 |
-
def predict():
|
13 |
-
data = request.json
|
14 |
-
activities = data.get('activities')
|
15 |
-
|
16 |
-
# Placeholder logic for prediction (replace with your ML model)
|
17 |
-
if activities:
|
18 |
-
predicted_score = sum(activities) / len(activities) # Example logic
|
19 |
-
return jsonify({'predicted_score': predicted_score})
|
20 |
-
return jsonify({'error': 'No activities provided'}), 400
|
21 |
-
|
22 |
-
if __name__ == '__main__':
|
23 |
-
app.run(host='0.0.0.0', port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
certifi==2024.12.14
|
2 |
-
charset-normalizer==3.4.1
|
3 |
-
filelock==3.16.1
|
4 |
-
fsspec==2024.12.0
|
5 |
-
huggingface-hub==0.27.0
|
6 |
-
idna==3.10
|
7 |
-
joblib==1.4.2
|
8 |
-
numpy==2.2.1
|
9 |
-
packaging==24.2
|
10 |
-
PyYAML==6.0.2
|
11 |
-
requests==2.32.3
|
12 |
-
scikit-learn==1.6.0
|
13 |
-
scipy==1.15.0
|
14 |
-
threadpoolctl==3.5.0
|
15 |
-
tqdm==4.67.1
|
16 |
-
typing_extensions==4.12.2
|
17 |
-
urllib3==2.3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/index.html
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Student Score Predictor</title>
|
7 |
-
</head>
|
8 |
-
<body>
|
9 |
-
<h1>Welcome to the Student Score Predictor</h1>
|
10 |
-
<p>Submit your activities scores via POST request to /predict to get the final score prediction.</p>
|
11 |
-
</body>
|
12 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|