Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| # Create a pipeline using the model you want | |
| pipe = pipeline("text-generation", model="inceptionai/jais-13b", trust_remote_code=True) | |
| # Function to generate text | |
| def generate_text(prompt): | |
| return pipe(prompt)[0]['generated_text'] | |
| # Set up the Gradio interface | |
| iface = gr.Interface(fn=generate_text, inputs="text", outputs="text") | |
| # Launch the interface | |
| iface.launch() | |