Spaces:
Runtime error
Runtime error
horsey-defy commited on
Commit ·
3a4ba99
1
Parent(s): 5daa359
Fixed responses
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ class RenderNet:
|
|
| 77 |
'replicantV30_v30.safetensors [cf65f48ecf]'
|
| 78 |
]
|
| 79 |
|
| 80 |
-
return response
|
| 81 |
|
| 82 |
def list_samplers(self):
|
| 83 |
response = [
|
|
@@ -87,7 +87,7 @@ class RenderNet:
|
|
| 87 |
'Euler a',
|
| 88 |
'DPM++ 2M SDE Karras'
|
| 89 |
]
|
| 90 |
-
return response
|
| 91 |
|
| 92 |
def _post(self, url, params):
|
| 93 |
headers = {
|
|
@@ -99,8 +99,7 @@ class RenderNet:
|
|
| 99 |
if response.status_code != 200:
|
| 100 |
raise Exception(f"Bad RenderNet Response: {response.status_code}")
|
| 101 |
|
| 102 |
-
|
| 103 |
-
return json.dumps(response)
|
| 104 |
|
| 105 |
def _get(self, url):
|
| 106 |
response = requests.get(url, headers=self.headers)
|
|
@@ -108,8 +107,7 @@ class RenderNet:
|
|
| 108 |
if response.status_code != 200:
|
| 109 |
raise Exception(f"Bad RenderNet Response: {response.status_code}")
|
| 110 |
|
| 111 |
-
|
| 112 |
-
return json.dumps(response)
|
| 113 |
|
| 114 |
|
| 115 |
def image_to_base64(image):
|
|
|
|
| 77 |
'replicantV30_v30.safetensors [cf65f48ecf]'
|
| 78 |
]
|
| 79 |
|
| 80 |
+
return json.dumps(response)
|
| 81 |
|
| 82 |
def list_samplers(self):
|
| 83 |
response = [
|
|
|
|
| 87 |
'Euler a',
|
| 88 |
'DPM++ 2M SDE Karras'
|
| 89 |
]
|
| 90 |
+
return json.dumps(response)
|
| 91 |
|
| 92 |
def _post(self, url, params):
|
| 93 |
headers = {
|
|
|
|
| 99 |
if response.status_code != 200:
|
| 100 |
raise Exception(f"Bad RenderNet Response: {response.status_code}")
|
| 101 |
|
| 102 |
+
return response
|
|
|
|
| 103 |
|
| 104 |
def _get(self, url):
|
| 105 |
response = requests.get(url, headers=self.headers)
|
|
|
|
| 107 |
if response.status_code != 200:
|
| 108 |
raise Exception(f"Bad RenderNet Response: {response.status_code}")
|
| 109 |
|
| 110 |
+
return response
|
|
|
|
| 111 |
|
| 112 |
|
| 113 |
def image_to_base64(image):
|