/
githubmirror
/
screenshot-to-code
Обзор
Документация
Войти
/
githubmirror
/
screenshot-to-code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
backend/evals/utils.py
7 строк
228 B
Abi Raja
organize evals code into the evals dir
09 янв 2024, 04:38
09 янв 2024, 04:38
b8bce72
Код
Авторство
О чём код?
import base64 async def image_to_data_url(filepath: str): with open(filepath, "rb") as image_file: encoded_string = base64.b64encode(image_file.read()).decode() return f"data:image/png;base64,{encoded_string}"