MerchFlow-AI / fix_readme.py
Gaurav vashistha
Add N8N Integration
14589fa
import os
import sys
import subprocess
# Force UTF-8 output for Windows terminals
sys.stdout.reconfigure(encoding='utf-8')
readme_content = """---
title: MerchFlow AI
emoji: πŸš€
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
---
# MerchFlow AI
An AI-powered merchandising agent.
"""
def run_command(command):
print(f"Running: {command}")
try:
subprocess.run(command, check=True, shell=True)
print("βœ… Success")
except subprocess.CalledProcessError as e:
print(f"❌ Error: {e}")
# Don't exit, try to continue or let user see error
def fix_readme():
print("Writing README.md...")
with open("README.md", "w", encoding="utf-8") as f:
f.write(readme_content)
print("βœ… Created README.md")
print("Deploying changes...")
run_command("git add README.md")
run_command('git commit -m "Add Hugging Face configuration"')
run_command("git push space clean_deploy:main")
print("βœ… Configuration fixed and pushed!")
if __name__ == "__main__":
fix_readme()