Spaces:
Runtime error
Runtime error
File size: 506 Bytes
2043da0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
from transformers import pipeline
def text_generation_model(input_text):
model = pipeline("text-generation", model="facebook/galactica-6.7b")
output_text = model(input_text)
return output_text
input_text_interface = gr.inputs.Textbox(placeholder="Enter text here")
output_text_interface = gr.outputs.Textbox()
interface = gr.Interface(fn=text_generation_model, inputs=input_text_interface, outputs=output_text_interface, title="Text Generation Model")
interface.launch()
|