Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,8 +54,11 @@ if prompt := st.chat_input("What is up?"):
|
|
| 54 |
"--method", "global",
|
| 55 |
prompt
|
| 56 |
]
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
# Display assistant response in chat message container
|
| 61 |
with st.chat_message("assistant"):
|
|
|
|
| 54 |
"--method", "global",
|
| 55 |
prompt
|
| 56 |
]
|
| 57 |
+
try:
|
| 58 |
+
result = subprocess.run(command, capture_output=True, text=True, check=True)
|
| 59 |
+
response = result.stdout
|
| 60 |
+
except subprocess.CalledProcessError as e:
|
| 61 |
+
response = e.output
|
| 62 |
|
| 63 |
# Display assistant response in chat message container
|
| 64 |
with st.chat_message("assistant"):
|