Test_subhi / app.py
blade077's picture
Create app.py
9f5614c verified
raw
history blame contribute delete
304 Bytes
import gradio as gr
from transformers import pipeline
# Use a pipeline as a high-level helper
model = pipeline("text-generation", model="cognitivecomputations/samantha-mistral-7b")
def predict(text):
return model(text)
demo = gr.Interface(fn=predict, inputs="text", outputs="label")
demo.launch()