Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,13 +62,13 @@ def inference(audio, state=""):
|
|
| 62 |
A few examples are provided below and then the current transcript is provided.
|
| 63 |
Examples:
|
| 64 |
Transcript: Tomorrow night we're going out to
|
| 65 |
-
|
| 66 |
Transcript: I would like to order a cheeseburger with a side of
|
| 67 |
-
|
| 68 |
Transcript: My friend Savanah is
|
| 69 |
-
|
| 70 |
Transcript: I need to buy a birthday
|
| 71 |
-
|
| 72 |
"""
|
| 73 |
text = PROMPT + result.text
|
| 74 |
|
|
@@ -89,13 +89,13 @@ def inference(audio, state=""):
|
|
| 89 |
print("print2: infers ", infers)
|
| 90 |
print("print3: Responses ", response)
|
| 91 |
print("Object type of response: ", type(response))
|
| 92 |
-
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
# result.text
|
| 97 |
#return getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
| 98 |
-
return result.text, state,
|
| 99 |
|
| 100 |
|
| 101 |
|
|
|
|
| 62 |
A few examples are provided below and then the current transcript is provided.
|
| 63 |
Examples:
|
| 64 |
Transcript: Tomorrow night we're going out to
|
| 65 |
+
Prediction: The Movies to watch a blockbuster, A Restaurant for dinner, A Baseball Game, The Theater, A Party for a friend
|
| 66 |
Transcript: I would like to order a cheeseburger with a side of
|
| 67 |
+
Prediction: Frnech fries, Milkshake, Apple slices, Side salad, Extra katsup
|
| 68 |
Transcript: My friend Savanah is
|
| 69 |
+
Prediction: An elecrical engineer, A marine biologist, A classical musician
|
| 70 |
Transcript: I need to buy a birthday
|
| 71 |
+
Prediction: Present, Gift, Cake, Card
|
| 72 |
"""
|
| 73 |
text = PROMPT + result.text
|
| 74 |
|
|
|
|
| 89 |
print("print2: infers ", infers)
|
| 90 |
print("print3: Responses ", response)
|
| 91 |
print("Object type of response: ", type(response))
|
| 92 |
+
infered = list(map(lambda x: x.split(',')[0], infers))
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
# result.text
|
| 97 |
#return getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
| 98 |
+
return result.text, state, infered
|
| 99 |
|
| 100 |
|
| 101 |
|