import gradio as gr | |
from transformers import pipeline | |
model = pipeline("text-generation", model="DmitryYarov/aristotle_based_on_rugpt3large_based_on_gpt") | |
def predict(prompt): | |
completion = model(prompt)[0]["generated_text"] | |
return completion | |
gr.Interface(fn=predict, inputs="text", outputs="text").launch(share=True) | |