Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from components.create_repository import create_repository_form | |
| def render_repository_management(): | |
| """Render the repository management page""" | |
| st.title("ποΈ Repository Management") | |
| st.markdown( | |
| """ | |
| Create and manage your Hugging Face model repositories. | |
| A repository is where you store model files, configuration, and documentation. | |
| """ | |
| ) | |
| # Create new repository section | |
| created, repo_id = create_repository_form() | |
| if created and repo_id: | |
| # If repository was created, navigate to model details page | |
| st.session_state.selected_model = repo_id | |
| st.session_state.page = "model_details" | |
| st.rerun() | |
| # Tips for repository creation | |
| with st.expander("Tips for creating a good repository"): | |
| st.markdown( | |
| """ | |
| ### Best Practices for Model Repositories | |
| 1. **Choose a descriptive name** | |
| - Use clear, lowercase names with hyphens (e.g., `bert-finetuned-sentiment`) | |
| - Avoid generic names like "test" or "model" | |
| 2. **Add appropriate tags** | |
| - Tags help others discover your model | |
| - Include task types (e.g., "text-classification", "object-detection") | |
| - Add framework tags (e.g., "pytorch", "tensorflow") | |
| 3. **Write a comprehensive model card** | |
| - Describe what the model does and how it was trained | |
| - Document model limitations and biases | |
| - Include performance metrics | |
| - Specify intended use cases | |
| 4. **Organize your files** | |
| - Include all necessary files for model loading | |
| - Add configuration files | |
| - Include example scripts if helpful | |
| 5. **License your model appropriately** | |
| - Choose an open-source license if possible | |
| - Document any usage restrictions | |
| """ | |
| ) | |