Spaces:
Runtime error
Runtime error
Commit
·
0e79306
1
Parent(s):
0099d95
Update main.py
Browse files
main.py
CHANGED
@@ -7,6 +7,7 @@ from gradio_client import Client
|
|
7 |
import base64
|
8 |
import requests
|
9 |
import os
|
|
|
10 |
|
11 |
app = FastAPI()
|
12 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
@@ -66,7 +67,7 @@ def generate_image():
|
|
66 |
453666937,
|
67 |
fn_index=0
|
68 |
)
|
69 |
-
image_url = os.path.abspath(os.path.dirname(__file__)) + result
|
70 |
return {"response": image_url}
|
71 |
|
72 |
@app.get("/Test")
|
|
|
7 |
import base64
|
8 |
import requests
|
9 |
import os
|
10 |
+
import subprocess
|
11 |
|
12 |
app = FastAPI()
|
13 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
|
67 |
453666937,
|
68 |
fn_index=0
|
69 |
)
|
70 |
+
image_url = subprocess.run(["docker", "ps", "--format", "{{.Names}}"], capture_output=True, text=True) + os.path.abspath(os.path.dirname(__file__)) + result
|
71 |
return {"response": image_url}
|
72 |
|
73 |
@app.get("/Test")
|