update
Browse files234 unmodified lines23523623723823924024157 unmodified lines2993003013023033043 unmodified lines3083093103113123133143 unmodified lines3183193203213223233243 unmodified lines328329330331332333234 unmodified lines)# Prepare the HTML content with proper structurefull_html = f"""<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">57 unmodified lines</body></html>"""# Upload the HTML fileuser_hf_api.upload_file(path_or_fileobj=full_html.encode('utf-8'),3 unmodified lines)# Create README.md with project inforeadme_content = f"""# {title}This project was generated using [AnyCoder](https://huggingface.co/spaces/ahsenkhaliq/anycoder), an AI-powered code generator.3 unmodified lines## Generated Prompts{f"".join([f"- {prompt}\n" for prompt in (prompts or [])])}## View Live3 unmodified lines*Generated with ❤️ using AnyCoder*"""user_hf_api.upload_file(path_or_fileobj=readme_content.encode('utf-8'),path_in_repo="README.md",234 unmodified lines23523623723823924024157 unmodified lines2993003013023033043053063 unmodified lines3103113123133143153163173 unmodified lines3213223233243253263273 unmodified lines331332333334335336337338234 unmodified lines)# Prepare the HTML content with proper structurehtml_template = """<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">57 unmodified lines</body></html>"""full_html = html_template.format(title=title, html_content=html_content)# Upload the HTML fileuser_hf_api.upload_file(path_or_fileobj=full_html.encode('utf-8'),3 unmodified lines)# Create README.md with project infoprompts_text = "".join([f"- {prompt}\n" for prompt in (prompts or [])])readme_template = """# {title}This project was generated using [AnyCoder](https://huggingface.co/spaces/ahsenkhaliq/anycoder), an AI-powered code generator.3 unmodified lines## Generated Prompts{prompts_text}## View Live3 unmodified lines*Generated with ❤️ using AnyCoder*"""readme_content = readme_template.format(title=title, prompts_text=prompts_text, repo_name=repo_name)user_hf_api.upload_file(path_or_fileobj=readme_content.encode('utf-8'),path_in_repo="README.md",
app.py+8-3