Spaces:
Runtime error
Runtime error
azaninello
commited on
Commit
•
9147dc2
1
Parent(s):
b139197
Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,24 @@ def sentence(cerca_una_parola):
|
|
13 |
return f"""La parola da cercare è {cerca_una_parola}"""
|
14 |
|
15 |
|
16 |
-
def upper(
|
17 |
-
return
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
demo = gr.Interface([fn=sentence, inputs='text', outputs='text'], [n=upper, inputs=cerca_una_parola, outputs='text'])
|
20 |
demo.launch()
|
21 |
|
|
|
13 |
return f"""La parola da cercare è {cerca_una_parola}"""
|
14 |
|
15 |
|
16 |
+
def upper(parola):
|
17 |
+
return parola.upper()
|
18 |
+
|
19 |
+
demo = gr.Blocks()
|
20 |
+
|
21 |
+
with demo:
|
22 |
+
cerca_parola = gr.Textbox()
|
23 |
+
text = gr.Textbox()
|
24 |
+
#number = gr.Number()
|
25 |
+
|
26 |
+
b1 = gr.Button("Inserisci parole")
|
27 |
+
b2 = gr.Button("Falla maiuscola")
|
28 |
+
|
29 |
+
b1.click(sentence, inputs=cerca_parola, outputs=text)
|
30 |
+
b2.click(upper, inputs=text, outputs='text')
|
31 |
+
|
32 |
+
demo.launch()
|
33 |
+
|
34 |
demo = gr.Interface([fn=sentence, inputs='text', outputs='text'], [n=upper, inputs=cerca_una_parola, outputs='text'])
|
35 |
demo.launch()
|
36 |
|