Spaces:
Running
Running
lalashechka
commited on
Commit
•
c33de68
1
Parent(s):
6c5201f
Update app.py
Browse files
app.py
CHANGED
@@ -43,16 +43,16 @@ def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
|
|
43 |
|
44 |
url_sd5 = os.getenv("url_sd5")
|
45 |
url_sd6 = os.getenv("url_sd6")
|
46 |
-
|
47 |
if task == "Playground v2":
|
48 |
playground = str(os.getenv("playground"))
|
49 |
-
client = Client(playground)
|
50 |
result = client.predict(prompt, "", False, 220, 1024, 1024, 3, True, api_name="/run")
|
51 |
return result[0][0]['image']
|
52 |
|
53 |
if task == "OpenDalle v1.1":
|
54 |
opendalle = str(os.getenv("opendalle"))
|
55 |
-
client = Client(opendalle)
|
56 |
result = client.predict(prompt, "", "", "", False, False, False, 999, 1024, 1024, 5, 5, 25, 25, False, api_name="/run")
|
57 |
return result
|
58 |
|
|
|
43 |
|
44 |
url_sd5 = os.getenv("url_sd5")
|
45 |
url_sd6 = os.getenv("url_sd6")
|
46 |
+
hf_token = os.getenv("hf_token")
|
47 |
if task == "Playground v2":
|
48 |
playground = str(os.getenv("playground"))
|
49 |
+
client = Client(playground, hf_token=hf_token)
|
50 |
result = client.predict(prompt, "", False, 220, 1024, 1024, 3, True, api_name="/run")
|
51 |
return result[0][0]['image']
|
52 |
|
53 |
if task == "OpenDalle v1.1":
|
54 |
opendalle = str(os.getenv("opendalle"))
|
55 |
+
client = Client(opendalle, hf_token=hf_token)
|
56 |
result = client.predict(prompt, "", "", "", False, False, False, 999, 1024, 1024, 5, 5, 25, 25, False, api_name="/run")
|
57 |
return result
|
58 |
|