update documentation

This commit is contained in:
Ali Abid 2020-08-25 16:36:45 -07:00
parent fdfe069b07
commit a6f58574c2
4 changed files with 5 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -1,4 +1,4 @@
# Demo: (Image) -> (HighlightedText, KeyValues, HTML)
# Demo: (Image) -> (Image)
import gradio as gr
import numpy as np

View File

@ -11,8 +11,8 @@ in_demos, out_demos = {}, {}
demo_regex = "# Demo: \((.*)\) -> \((.*)\)"
for demo in listdir("demo"):
if demo.endswith(".py"):
screenshots = listdir(join("demo/screenshots", demo[:-3]))
demoset = [demo, screenshots]
screenshots = listdir(join("demo/screenshots", demo[:-3]))[0]
demoset = [demo, [screenshots]]
with open(join("demo", demo)) as demo_file:
first_line = demo_file.readline()
match = re.match(demo_regex, first_line)
@ -21,12 +21,12 @@ for demo in listdir("demo"):
for i in inputs:
if i not in in_demos:
in_demos[i] = []
elif demoset not in in_demos[i]:
if demoset not in in_demos[i]:
in_demos[i].append(demoset)
for o in outputs:
if o not in out_demos:
out_demos[o] = []
elif demoset not in out_demos[o]:
if demoset not in out_demos[o]:
out_demos[o].append(demoset)
def get_params(func):