Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
generator = pipeline("summarization", model="Falconsai/medical_summarization") | |
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(share=True) | |