mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
c0d70a7af5
* mic name * changelog * marked as flaky
14 lines
396 B
Python
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)
|