Spaces:
Runtime error
Runtime error
File size: 586 Bytes
367912e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import bardapi
# Загружаем модель
model = bardapi.BardModel("bard-base")
# Создаем функцию, которая генерирует текст
def generate_text(prompt):
return model.generate_text(prompt)
# Создаем интерфейс
gr.Interface(generate_text,
title="Генератор текста",
description="Генерирует текст по заданному запросу",
input_components=[gr.TextInput(label="Запрос")],
output_components=[gr.OutputText(label="Текст")])
|