mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
added mix.* to gradio init
This commit is contained in:
parent
222279a266
commit
6424973b3a
@ -1,5 +1,6 @@
|
||||
from gradio.interface import * # This makes it possible to import `Interface` as `gradio.Interface`.
|
||||
from gradio.networking import get_state, set_state
|
||||
from gradio.mix import *
|
||||
import pkg_resources
|
||||
|
||||
current_pkg_version = pkg_resources.require("gradio")[0].version
|
||||
|
@ -71,7 +71,7 @@ class Interface:
|
||||
title=None, description=None, article=None, thumbnail=None,
|
||||
css=None, server_port=None, server_name=networking.LOCALHOST_NAME, height=500, width=900,
|
||||
allow_screenshot=True, allow_flagging=True, flagging_options=None, encrypt=False,
|
||||
show_tips=False, embedding=None, flagging_dir="flagged", analytics_enabled=True, enable_queue=False):
|
||||
show_tips=False, flagging_dir="flagged", analytics_enabled=True, enable_queue=False):
|
||||
"""
|
||||
Parameters:
|
||||
fn (Callable): the function to wrap an interface around.
|
||||
@ -177,7 +177,6 @@ class Interface:
|
||||
self.share = None
|
||||
self.share_url = None
|
||||
self.local_url = None
|
||||
self.embedding = embedding
|
||||
self.show_tips = show_tips
|
||||
self.requires_permissions = any(
|
||||
[component.requires_permissions for component in self.input_components])
|
||||
@ -190,7 +189,6 @@ class Interface:
|
||||
'capture_session': capture_session,
|
||||
'ip_address': ip_address,
|
||||
'interpretation': interpretation,
|
||||
'embedding': embedding,
|
||||
'allow_flagging': allow_flagging,
|
||||
'allow_screenshot': allow_screenshot,
|
||||
'custom_css': self.css is not None,
|
||||
@ -259,7 +257,6 @@ class Interface:
|
||||
"allow_flagging": self.allow_flagging,
|
||||
"flagging_options": self.flagging_options,
|
||||
"allow_interpretation": self.interpretation is not None,
|
||||
"allow_embedding": self.embedding is not None,
|
||||
"queue": self.enable_queue
|
||||
}
|
||||
try:
|
||||
|
@ -1,9 +1,9 @@
|
||||
"""
|
||||
Ways to transform interfaces to produce new interfaces
|
||||
"""
|
||||
from gradio.interface import Interface
|
||||
import gradio
|
||||
|
||||
class Parallel(Interface):
|
||||
class Parallel(gradio.Interface):
|
||||
"""
|
||||
Creates a new Interface consisting of multiple models in parallel
|
||||
Parameters:
|
||||
@ -30,7 +30,7 @@ class Parallel(Interface):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class Series(Interface):
|
||||
class Series(gradio.Interface):
|
||||
"""
|
||||
Creates a new Interface from multiple models in series (the output of one is fed as the input to the next)
|
||||
Parameters:
|
||||
|
Loading…
Reference in New Issue
Block a user