added documentation

This commit is contained in:
Abubakar Abid 2019-02-27 17:09:45 -08:00
parent 8b90e6e001
commit a3a3820cf9
4 changed files with 24 additions and 3 deletions

View File

@ -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):

View File

@ -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:
"""
"""

View File

@ -1,3 +1,7 @@
'''
Defines helper methods useful for setting up ports, launching servers, and handling `ngrok`
'''
import subprocess
import requests
import zipfile

View File

@ -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