Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -71,17 +71,25 @@ def infer(audio_file):
|
|
71 |
|
72 |
result = client.predict(
|
73 |
llama_q, # str in 'Message' Textbox component
|
74 |
-
api_name="/
|
75 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
print(
|
78 |
|
79 |
-
images = pipe(prompt=
|
80 |
|
81 |
print("Finished")
|
82 |
|
83 |
#return cap_result, result, images
|
84 |
-
return images,
|
85 |
|
86 |
css = """
|
87 |
#col-container {max-width: 510px; margin-left: auto; margin-right: auto;}
|
|
|
71 |
|
72 |
result = client.predict(
|
73 |
llama_q, # str in 'Message' Textbox component
|
74 |
+
api_name="/chat"
|
75 |
)
|
76 |
+
|
77 |
+
# will return a list of outputs, one for each iteration
|
78 |
+
while not result.done():
|
79 |
+
continue
|
80 |
+
|
81 |
+
# will return a list of outputs, one for each iteration.
|
82 |
+
# so get the last one
|
83 |
+
final_res = result.outputs()[-1]
|
84 |
|
85 |
+
print(final_res)
|
86 |
|
87 |
+
images = pipe(prompt=final_res).images[0]
|
88 |
|
89 |
print("Finished")
|
90 |
|
91 |
#return cap_result, result, images
|
92 |
+
return images, final_res, gr.update(visible=True)
|
93 |
|
94 |
css = """
|
95 |
#col-container {max-width: 510px; margin-left: auto; margin-right: auto;}
|