Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,5 @@
|
|
| 1 |
-
#
|
| 2 |
import gradio as gr
|
| 3 |
-
import time
|
| 4 |
-
import numpy as np
|
| 5 |
-
import matplotlib.pyplot as plt
|
| 6 |
-
from PIL import Image
|
| 7 |
-
import random
|
| 8 |
|
| 9 |
# Example 1: Interface Transformation - Components change their properties with each click
|
| 10 |
def create_transformation_demo():
|
|
@@ -120,7 +115,6 @@ def create_accordion_demo():
|
|
| 120 |
|
| 121 |
# Handlers to collapse or expand all
|
| 122 |
def collapse_all():
|
| 123 |
-
#time.sleep(1)
|
| 124 |
return [
|
| 125 |
gr.Accordion(open=False),
|
| 126 |
gr.Accordion(open=False),
|
|
@@ -129,7 +123,6 @@ def create_accordion_demo():
|
|
| 129 |
]
|
| 130 |
|
| 131 |
def expand_all():
|
| 132 |
-
#time.sleep(1)
|
| 133 |
return [
|
| 134 |
gr.Accordion(open=True),
|
| 135 |
gr.Accordion(open=True),
|
|
|
|
| 1 |
+
# A sample Gradio demo that showcases the usual server round trips when updating component properties
|
| 2 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Example 1: Interface Transformation - Components change their properties with each click
|
| 5 |
def create_transformation_demo():
|
|
|
|
| 115 |
|
| 116 |
# Handlers to collapse or expand all
|
| 117 |
def collapse_all():
|
|
|
|
| 118 |
return [
|
| 119 |
gr.Accordion(open=False),
|
| 120 |
gr.Accordion(open=False),
|
|
|
|
| 123 |
]
|
| 124 |
|
| 125 |
def expand_all():
|
|
|
|
| 126 |
return [
|
| 127 |
gr.Accordion(open=True),
|
| 128 |
gr.Accordion(open=True),
|