DnD / app.py
Ceetar's picture
adding text gen pipeline
2db5787
raw
history blame
No virus
420 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline("text-generation", model="mistralai/Mistral-7B-v0.1")
#generates an AI description of your character
def describe(names):
return "Hello " + pipe(names) + "!!"
iface = gr.Interface(fn=describe, inputs=gr.Textbox(label="Your DND character",show_label=True),
outputs=gr.Textbox(label="The character",show_label=True))
iface.launch()