Spaces:
Running
Running
Commit
·
0dac1b8
1
Parent(s):
834978e
add requiretment
Browse files
app.py
CHANGED
@@ -13,11 +13,15 @@ def greet(name1, name2, name3, name4, name5):
|
|
13 |
command = f"poetry run runoak set-apikey -e openai {str1}"
|
14 |
|
15 |
# Execute the command
|
16 |
-
subprocess.run(command, shell=True)
|
|
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
# For the purpose of this example, I'm just returning the values concatenated
|
20 |
-
return f"Inputs received: {str1}, {str2}, {str3}, {str4}, {str5}"
|
21 |
|
22 |
# Define 5 text input boxes with labels
|
23 |
input_boxes = [
|
|
|
13 |
command = f"poetry run runoak set-apikey -e openai {str1}"
|
14 |
|
15 |
# Execute the command
|
16 |
+
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
17 |
+
|
18 |
+
# Save the output to a string
|
19 |
+
output_string = result.stdout
|
20 |
+
error_string = result.stderr
|
21 |
|
22 |
|
23 |
# For the purpose of this example, I'm just returning the values concatenated
|
24 |
+
return f"Inputs received: {str1}, {str2}, {str3}, {str4}, {str5}, {output_string},{error_string}"
|
25 |
|
26 |
# Define 5 text input boxes with labels
|
27 |
input_boxes = [
|