mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-03 01:50:59 +08:00
added documentation
This commit is contained in:
parent
8b90e6e001
commit
a3a3820cf9
@ -1,9 +1,15 @@
|
||||
"""
|
||||
This module defines various classes that can serve as the `input` to an interface. Each class must inherit from
|
||||
`AbstractInput`, and each class must define a path to its template. All of the subclasses of `AbstractInput` are
|
||||
automatically added to a registry, which allows them to be easily referenced in other parts of the code.
|
||||
"""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
import base64
|
||||
from PIL import Image
|
||||
from gradio import preprocessing_utils
|
||||
from io import BytesIO
|
||||
import numpy as np
|
||||
from gradio import preprocessing_utils
|
||||
from PIL import Image
|
||||
|
||||
|
||||
class AbstractInput(ABC):
|
||||
|
@ -1,3 +1,8 @@
|
||||
'''
|
||||
This is the core file in the `gradio` package, and defines the Interface class, including methods for constructing the
|
||||
interface using the input and output types.
|
||||
'''
|
||||
|
||||
import asyncio
|
||||
import websockets
|
||||
import nest_asyncio
|
||||
@ -27,7 +32,7 @@ TEMPLATE_TEMP = 'interface.html'
|
||||
BASE_JS_FILE = 'js/all-io.js'
|
||||
|
||||
|
||||
class Interface():
|
||||
class Interface:
|
||||
"""
|
||||
"""
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
'''
|
||||
Defines helper methods useful for setting up ports, launching servers, and handling `ngrok`
|
||||
'''
|
||||
|
||||
import subprocess
|
||||
import requests
|
||||
import zipfile
|
||||
|
@ -1,3 +1,9 @@
|
||||
"""
|
||||
This module defines various classes that can serve as the `output` to an interface. Each class must inherit from
|
||||
`AbstractOutput`, and each class must define a path to its template. All of the subclasses of `AbstractOutput` are
|
||||
automatically added to a registry, which allows them to be easily referenced in other parts of the code.
|
||||
"""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
import numpy as np
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user