Spaces:
Runtime error
Runtime error
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,71 +0,0 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
from utils import set_page_config, display_sidebar
|
| 3 |
-
import os
|
| 4 |
-
|
| 5 |
-
# Set page configuration
|
| 6 |
-
set_page_config()
|
| 7 |
-
|
| 8 |
-
# Title and description
|
| 9 |
-
st.title("CodeGen Hub")
|
| 10 |
-
st.markdown("""
|
| 11 |
-
Welcome to CodeGen Hub - A platform for training and using code generation models with Hugging Face integration.
|
| 12 |
-
|
| 13 |
-
### Core Features:
|
| 14 |
-
- Upload and preprocess Python code datasets for model training
|
| 15 |
-
- Configure and train models with customizable parameters
|
| 16 |
-
- Generate code predictions using trained models through an interactive interface
|
| 17 |
-
- Monitor training progress with visualizations and detailed logs
|
| 18 |
-
- Seamless integration with Hugging Face Hub for model management
|
| 19 |
-
|
| 20 |
-
Navigate through the different sections using the sidebar menu.
|
| 21 |
-
""")
|
| 22 |
-
|
| 23 |
-
# Display sidebar
|
| 24 |
-
display_sidebar()
|
| 25 |
-
|
| 26 |
-
# Create the session state for storing information across app pages
|
| 27 |
-
if 'datasets' not in st.session_state:
|
| 28 |
-
st.session_state.datasets = {}
|
| 29 |
-
|
| 30 |
-
if 'trained_models' not in st.session_state:
|
| 31 |
-
st.session_state.trained_models = {}
|
| 32 |
-
|
| 33 |
-
if 'training_logs' not in st.session_state:
|
| 34 |
-
st.session_state.training_logs = []
|
| 35 |
-
|
| 36 |
-
if 'training_progress' not in st.session_state:
|
| 37 |
-
st.session_state.training_progress = {}
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
# Display getting started card
|
| 42 |
-
st.subheader("Getting Started")
|
| 43 |
-
col1, col2 = st.columns(2)
|
| 44 |
-
|
| 45 |
-
with col1:
|
| 46 |
-
st.info("""
|
| 47 |
-
1. 📊 Start by uploading or selecting a Python code dataset in the **Dataset Management** section.
|
| 48 |
-
2. 🛠️ Configure and train your model in the **Model Training** section.
|
| 49 |
-
""")
|
| 50 |
-
|
| 51 |
-
with col2:
|
| 52 |
-
st.info("""
|
| 53 |
-
3. 💡 Generate code predictions using your trained models in the **Code Generation** section.
|
| 54 |
-
4. 🔄 Access your models on Hugging Face Hub for broader use.
|
| 55 |
-
""")
|
| 56 |
-
|
| 57 |
-
# Display platform statistics if available
|
| 58 |
-
st.subheader("Platform Statistics")
|
| 59 |
-
col1, col2, col3 = st.columns(3)
|
| 60 |
-
|
| 61 |
-
with col1:
|
| 62 |
-
st.metric("Datasets Available", len(st.session_state.datasets))
|
| 63 |
-
|
| 64 |
-
with col2:
|
| 65 |
-
st.metric("Trained Models", len(st.session_state.trained_models))
|
| 66 |
-
|
| 67 |
-
with col3:
|
| 68 |
-
# Calculate active training jobs
|
| 69 |
-
active_jobs = sum(1 for progress in st.session_state.training_progress.values()
|
| 70 |
-
if progress.get('status') == 'running')
|
| 71 |
-
st.metric("Active Training Jobs", active_jobs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|