Spaces:
Runtime error
Runtime error
File size: 359 Bytes
e13365d 290096d e13365d a005d28 e13365d 290096d |
1 2 3 4 5 6 7 8 9 10 11 12 |
import gradio as gr
from transformers import pipeline
generator = pipeline("text-generation", model="Writer/Palmyra-Med-70B-32K")
def generate_response(input_text):
response = generator(input_text, max_length=50)
return response[0]['generated_text1']
interface = gr.Interface(fn=generate_response, inputs="text", outputs="text")
interface.launch()
|