File size: 432 Bytes
ec2ecb9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os

readme_path = "README.md"

hf_space_metadata="""
---
title: Chameleon
emoji: 🦎
colorFrom: green
colorTo: yellow
sdk: streamlit
sdk_version: 1.31.1
app_file: src/app.py
pinned: true
---
"""

# Open the README file
with open(readme_path, 'r') as original:
    data = original.read()
# Rewrite the README file, with metadata prepended
with open(readme_path, 'w') as modified:
    modified.write(hf_space_metadata + data)