Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -104,13 +104,20 @@ def fn( text1, text2, single_checkbox, checkboxes, radio, im4,
|
|
104 |
# print("Datasets Processed")
|
105 |
|
106 |
return (
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
[
|
115 |
("The", "art"),
|
116 |
("quick brown", "adj"),
|
@@ -133,12 +140,7 @@ def fn( text1, text2, single_checkbox, checkboxes, radio, im4,
|
|
133 |
("dogs", 0.4),
|
134 |
(".", 0),
|
135 |
] + [(f"test", x / 10) for x in range(-10, 10)], # HighlightedText
|
136 |
-
|
137 |
-
|
138 |
json.loads(JSONOBJ), # JSON
|
139 |
-
#json.loads(JSONOBJ_MAP), # JSONOBJ_MAP
|
140 |
-
#json.loads(top1matchLOINC),
|
141 |
-
|
142 |
"<button style='background-color: red'>Click Me: " + radio + "</button>", # HTML
|
143 |
os.path.join(os.path.dirname(__file__), "files/titanic.csv"),
|
144 |
df1, # Dataframe
|
@@ -147,6 +149,7 @@ def fn( text1, text2, single_checkbox, checkboxes, radio, im4,
|
|
147 |
)
|
148 |
|
149 |
|
|
|
150 |
demo = gr.Interface(
|
151 |
fn,
|
152 |
inputs=[
|
|
|
104 |
# print("Datasets Processed")
|
105 |
|
106 |
return (
|
107 |
+
(text1 if single_checkbox else text2)
|
108 |
+
+ ", selected:"
|
109 |
+
+ ", ".join(checkboxes), # Text
|
110 |
+
{
|
111 |
+
"positive": num / (num + slider1 + slider2),
|
112 |
+
"negative": slider1 / (num + slider1 + slider2),
|
113 |
+
"neutral": slider2 / (num + slider1 + slider2),
|
114 |
+
}, # Label
|
115 |
+
(audio1[0], np.flipud(audio1[1]))
|
116 |
+
if audio1 is not None else os.path.join(os.path.dirname(__file__), "files/cantina.wav"), # Audio
|
117 |
+
np.flipud(im1)
|
118 |
+
if im1 is not None else os.path.join(os.path.dirname(__file__), "files/cheetah1.jpg"), # Image
|
119 |
+
video
|
120 |
+
if video is not None else os.path.join(os.path.dirname(__file__), "files/world.mp4"), # Video
|
121 |
[
|
122 |
("The", "art"),
|
123 |
("quick brown", "adj"),
|
|
|
140 |
("dogs", 0.4),
|
141 |
(".", 0),
|
142 |
] + [(f"test", x / 10) for x in range(-10, 10)], # HighlightedText
|
|
|
|
|
143 |
json.loads(JSONOBJ), # JSON
|
|
|
|
|
|
|
144 |
"<button style='background-color: red'>Click Me: " + radio + "</button>", # HTML
|
145 |
os.path.join(os.path.dirname(__file__), "files/titanic.csv"),
|
146 |
df1, # Dataframe
|
|
|
149 |
)
|
150 |
|
151 |
|
152 |
+
|
153 |
demo = gr.Interface(
|
154 |
fn,
|
155 |
inputs=[
|