Spaces:
Runtime error
Runtime error
Commit
·
130dafb
1
Parent(s):
c9d56ad
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ all_set = set(list(adjs) + list(Nns))
|
|
16 |
|
17 |
def test_input(words):
|
18 |
word_dict = {}
|
19 |
-
for w in words:
|
20 |
if w in all_set:
|
21 |
word_dict[w] = "in-distribution"
|
22 |
else:
|
@@ -55,7 +55,6 @@ examples = [["A red car is a vehicle"], ["A fake smile is a smile"], ["A small c
|
|
55 |
|
56 |
interface_words = gr.Interface(
|
57 |
fn=test_input,
|
58 |
-
inputs=gr.Textbox(value=
|
59 |
-
outputs="label",
|
60 |
)
|
61 |
interface_words.launch()
|
|
|
16 |
|
17 |
def test_input(words):
|
18 |
word_dict = {}
|
19 |
+
for w in words.split(","):
|
20 |
if w in all_set:
|
21 |
word_dict[w] = "in-distribution"
|
22 |
else:
|
|
|
55 |
|
56 |
interface_words = gr.Interface(
|
57 |
fn=test_input,
|
58 |
+
inputs=gr.Textbox(value="red,car,vehicle"),
|
|
|
59 |
)
|
60 |
interface_words.launch()
|