gradio/test/test_pipelines.py
Abubakar Abid c0d70a7af5
Fix for default file name of recorded audio files (#3770)
* mic name

* changelog

* marked as flaky
2023-04-05 13:20:03 -07:00

14 lines
396 B
Python

import pytest
import transformers
import gradio as gr
@pytest.mark.flaky
class TestLoadFromPipeline:
def test_text_to_text_model_from_pipeline(self):
pipe = transformers.pipeline(model="sshleifer/bart-tiny-random")
io = gr.Interface.from_pipeline(pipe)
output = io("My name is Sylvain and I work at Hugging Face in Brooklyn")
assert isinstance(output, str)