mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
cleanup
This commit is contained in:
parent
7cb04655e5
commit
d007d0a943
@ -6,7 +6,9 @@ import unittest
|
||||
import gradio as gr
|
||||
|
||||
"""
|
||||
WARNING: These tests have an external dependency: namely that Hugging Face's Hub and Space APIs do not change, and they keep their most famous models up. So if, e.g. Spaces is down, then these test will not pass.
|
||||
WARNING: These tests have an external dependency: namely that Hugging Face's
|
||||
Hub and Space APIs do not change, and they keep their most famous models up.
|
||||
So if, e.g. Spaces is down, then these test will not pass.
|
||||
"""
|
||||
|
||||
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
||||
@ -25,9 +27,8 @@ class TestHuggingFaceModelAPI(unittest.TestCase):
|
||||
|
||||
def test_text_generation(self):
|
||||
model_type = "text_generation"
|
||||
interface_info = gr.external.get_huggingface_interface("gpt2",
|
||||
api_key=None,
|
||||
alias=model_type)
|
||||
interface_info = gr.external.get_huggingface_interface(
|
||||
"gpt2", api_key=None, alias=model_type)
|
||||
self.assertEqual(interface_info["fn"].__name__, model_type)
|
||||
self.assertIsInstance(interface_info["inputs"], gr.inputs.Textbox)
|
||||
self.assertIsInstance(interface_info["outputs"], gr.outputs.Textbox)
|
||||
|
Loading…
Reference in New Issue
Block a user