Spaces:
Runtime error
Runtime error
File size: 2,654 Bytes
2b8f964 | 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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | import os
import json
def create_project_structure():
"""Crea la estructura completa del proyecto Series Analyzer Pro"""
# Estructura de carpetas
folders = [
"core",
"parsers",
"analyzers",
"analyzers/structural",
"analyzers/character",
"analyzers/production",
"analyzers/quality",
"models",
"templates",
"templates/prompts",
"templates/industry_formats",
"data",
"outputs",
"outputs/reports",
"outputs/visualizations",
"cache",
"utils",
"tests",
"tests/test_data"
]
# Crear carpetas
for folder in folders:
os.makedirs(folder, exist_ok=True)
# Crear __init__.py en cada carpeta Python
if not folder.startswith(("outputs", "cache", "data", "templates")):
init_path = os.path.join(folder, "__init__.py")
if not os.path.exists(init_path):
with open(init_path, 'w') as f:
f.write('"""Module for {}"""\n'.format(folder.replace("/", ".")))
# Crear config.yaml básico
config_content = """# Series Analyzer Pro Configuration
app:
name: "Series Analyzer Pro"
version: "1.0.0"
debug: true
analysis:
max_pages_per_episode: 60
min_pages_per_episode: 40
default_episode_count: 6
parser:
supported_formats: ["fdx", "pdf"]
encoding: "utf-8"
output:
reports_format: ["pdf", "html", "json"]
visualization_format: "png"
cache:
enabled: true
ttl_hours: 24
"""
with open("config.yaml", 'w') as f:
f.write(config_content)
# Crear requirements.txt actualizado
requirements = """# Series Analyzer Pro Requirements
# Core
gradio==4.44.0
torch>=2.0.0
transformers>=4.35.0
accelerate>=0.24.0
spaces>=0.18.0
sentencepiece>=0.1.99
protobuf<4
numpy<2.0
pyyaml>=6.0
# Parsing
lxml>=4.9.0
beautifulsoup4>=4.12.0
python-docx>=0.8.11
# Analysis
pandas>=2.0.0
matplotlib>=3.7.0
seaborn>=0.12.0
plotly>=5.14.0
networkx>=3.1
# NLP
spacy>=3.5.0
textstat>=0.7.3
# Scraping
requests>=2.31.0
selenium>=4.10.0
scrapy>=2.9.0
# Export
reportlab>=4.0.0
openpyxl>=3.1.0
python-pptx>=0.6.21
# Utils
tqdm>=4.65.0
python-dotenv>=1.0.0
"""
with open("requirements.txt", 'w') as f:
f.write(requirements)
print("✅ Estructura del proyecto creada exitosamente!")
print("\n📁 Carpetas creadas:")
for folder in folders:
print(f" - {folder}/")
print("\n📄 Archivos creados:")
print(" - config.yaml")
print(" - requirements.txt")
if __name__ == "__main__":
create_project_structure() |