Spaces:
Running
Running
Commit
·
a962daf
1
Parent(s):
00ad5c1
add requiretment
Browse files
app.py
CHANGED
@@ -30,22 +30,6 @@ def greet(name1, name2, name3, name4):
|
|
30 |
# output_string1, error_string1=run_command("poetry")# ontogpt")
|
31 |
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
import subprocess
|
36 |
-
|
37 |
-
def get_package_location(package_name):
|
38 |
-
try:
|
39 |
-
result = subprocess.check_output(["pip", "show", package_name], text=True)
|
40 |
-
for line in result.splitlines():
|
41 |
-
if line.startswith("Location:"):
|
42 |
-
return line.split(":")[1].strip()
|
43 |
-
except:
|
44 |
-
return 'not found'
|
45 |
-
|
46 |
-
package_name = "ontogpt" # Replace this with any package name
|
47 |
-
location = get_package_location(package_name)
|
48 |
-
|
49 |
# return location
|
50 |
# For the purpose of this example, I'm just returning the values concatenated
|
51 |
return f"Inputs received: {str1}, {str2}, {str3}, {str4}, '--------------', '--------------', {output_string1},{error_string1},{output_string2},{error_string2},{output}"
|
|
|
30 |
# output_string1, error_string1=run_command("poetry")# ontogpt")
|
31 |
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
# return location
|
34 |
# For the purpose of this example, I'm just returning the values concatenated
|
35 |
return f"Inputs received: {str1}, {str2}, {str3}, {str4}, '--------------', '--------------', {output_string1},{error_string1},{output_string2},{error_string2},{output}"
|