Blocks-Components

- solve import errors
This commit is contained in:
Ömer Faruk Özdemir 2022-03-17 10:54:18 +03:00
parent 26cdff3d84
commit 6e293d6940
2 changed files with 2 additions and 6 deletions

View File

@ -15,7 +15,7 @@ import pandas as pd
import PIL
from ffmpy import FFmpeg
from gradio import Interface, processing_utils, test_data
from gradio import processing_utils, test_data
from gradio.blocks import Block
@ -2387,7 +2387,7 @@ class Button(Component):
# TODO: (faruk) does this take component or interface as a input?
# see this line in Carousel
# self.components = [get_component_instance(component) for component in components]
def get_component_instance(iface: Interface):
def get_component_instance(iface: "Interface"):
# TODO: function may not work properly, and it needs updates regarding its design. See:
# https://github.com/gradio-app/gradio/issues/731
if isinstance(iface, str):

View File

@ -20,13 +20,9 @@ from mdit_py_plugins.footnote import footnote_plugin
from gradio import interpretation, utils
from gradio.external import load_from_pipeline, load_interface # type: ignore
from gradio.flagging import CSVLogger, FlaggingCallback # type: ignore
from gradio.inputs import InputComponent
from gradio.inputs import State as i_State # type: ignore
from gradio.inputs import get_input_instance
from gradio.launchable import Launchable
from gradio.outputs import OutputComponent
from gradio.outputs import State as o_State # type: ignore
from gradio.outputs import get_output_instance
from gradio.process_examples import load_from_cache, process_example
from gradio.routes import predict