Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,29 @@
|
|
| 1 |
-
import
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
| 1 |
+
from interpreter import interpreter
|
| 2 |
+
import streamlit as st
|
| 3 |
+
|
| 4 |
+
output = interpreter.chat("hi, how are you")
|
| 5 |
+
|
| 6 |
+
st.write(output)
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
# import subprocess
|
| 13 |
+
|
| 14 |
+
# def run_terminal_command(command):
|
| 15 |
+
# try:
|
| 16 |
+
# # Run the terminal command and capture its output
|
| 17 |
+
# output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)
|
| 18 |
+
# return output.decode("utf-8") # Decode bytes to string
|
| 19 |
+
# except subprocess.CalledProcessError as e:
|
| 20 |
+
# # Handle errors if the command fails
|
| 21 |
+
# return f"Error: {e.output.decode('utf-8')}"
|
| 22 |
+
|
| 23 |
+
# # Example command: list files in the current directory
|
| 24 |
+
# command = "ls"
|
| 25 |
+
# output = run_terminal_command(command)
|
| 26 |
+
# print(output)
|
| 27 |
|
| 28 |
|
| 29 |
|