danyx994
Новичок
from gradio_client import Clientодно в другое легко преобразовывается
from datetime import datetime
client = Client("https://choimirai-whisper-large-v3.hf.space/")
result = client.predict(
"https://www.youtube.com/watch?v=rotd-kaCX8c&t",
"transcribe",
True,
"English",
api_name="/predict_2"
)
current_datetime = datetime.now().strftime("%Y%m%d%H%M%S")
filename = f"result_{current_datetime}.txt"
with open(filename, "w") as file:
file.write(str(result))
print(f"Result saved to {filename}")