Spaces:
Runtime error
Runtime error
File size: 1,579 Bytes
06506f4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
import os
import sys
def create_project_structure():
"""Create the project directory structure and files"""
# Create directories
directories = [
'ESPN_data',
'embeddings_cache'
]
for directory in directories:
os.makedirs(directory, exist_ok=True)
print(f"Created directory: {directory}")
# Create .env file if it doesn't exist
if not os.path.exists('.env'):
with open('.env', 'w') as f:
f.write("HUGGINGFACE_API_KEY=your_api_key_here\n")
print("Created .env file")
# Create .gitignore if it doesn't exist
if not os.path.exists('.gitignore'):
gitignore_content = """
# Environment variables
.env
# Python
__pycache__/
*.py[cod]
*$py.class
# Distribution / packaging
dist/
build/
*.egg-info/
# Virtual Environment
venv/
env/
ENV/
# Cache directories
embeddings_cache/
.cache/
# IDE specific files
.vscode/
.idea/
# Operating System
.DS_Store
Thumbs.db
"""
with open('.gitignore', 'w') as f:
f.write(gitignore_content.strip())
print("Created .gitignore file")
print("\nProject structure created successfully!")
print("\nNext steps:")
print("1. Add your HuggingFace API key to the .env file")
print("2. Place your ESPN data CSV files in the ESPN_data directory")
print("3. Install requirements: pip install -r requirements.txt")
print("4. Run embedding generation: python embedding_processor.py")
print("5. Start the app: streamlit run app.py")
if __name__ == "__main__":
create_project_structure() |