Spaces:
Runtime error
Runtime error
Commit ·
680df3a
1
Parent(s): a5fb2ee
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,38 +7,8 @@ from io import BytesIO
|
|
| 7 |
# Set up environment variables for API keys
|
| 8 |
os.environ['CLIPDROP_API_KEY'] = '1143a102dbe21628248d4bb992b391a49dc058c584181ea72e17c2ccd49be9ca69ccf4a2b97fc82c89ff1029578abbea'
|
| 9 |
os.environ['STABILITY_API_KEY'] = 'sk-GBmsWR78MmCSAWGkkC1CFgWgE6GPgV00pNLJlxlyZWyT3QQO'
|
| 10 |
-
os.environ['REPLICATE_API_TOKEN'] = '
|
| 11 |
-
Upload an image or enter a text prompt to generate and upscale an image.
|
| 12 |
|
| 13 |
-
Choose an image...
|
| 14 |
-
|
| 15 |
-
Drag and drop file here
|
| 16 |
-
Limit 200MB per file • PNG, JPG, JPEG
|
| 17 |
-
upscaled_image (1).png
|
| 18 |
-
26.3MB
|
| 19 |
-
Enter a text prompt:
|
| 20 |
-
|
| 21 |
-
Perfect soft gradient, osx wallpaper, Faint gradient color, pattern, full screen, colorful, uhd, 8k --ar 16:9
|
| 22 |
-
109/1000
|
| 23 |
-
Uploaded image successfully!
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
ReplicateError: Incorrect authentication token. Learn how to authenticate and get your API token here: https://replicate.com/docs/reference/http#authentication
|
| 27 |
-
Traceback:
|
| 28 |
-
File "/home/user/.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
|
| 29 |
-
exec(code, module.__dict__)
|
| 30 |
-
File "/home/user/app/app.py", line 91, in <module>
|
| 31 |
-
main()
|
| 32 |
-
File "/home/user/app/app.py", line 80, in main
|
| 33 |
-
img = upscale_image("temp_img.png")
|
| 34 |
-
File "/home/user/app/app.py", line 20, in upscale_image
|
| 35 |
-
output = replicate.run(
|
| 36 |
-
File "/home/user/.local/lib/python3.10/site-packages/replicate/client.py", line 127, in run
|
| 37 |
-
version = model.versions.get(m.group("version"))
|
| 38 |
-
File "/home/user/.local/lib/python3.10/site-packages/replicate/version.py", line 62, in get
|
| 39 |
-
resp = self._client._request(
|
| 40 |
-
File "/home/user/.local/lib/python3.10/site-packages/replicate/client.py", line 79, in _request
|
| 41 |
-
raise ReplicateError(resp.json()["detail"])'
|
| 42 |
|
| 43 |
# Importing Replicate and Stability SDK libraries
|
| 44 |
import replicate
|
|
|
|
| 7 |
# Set up environment variables for API keys
|
| 8 |
os.environ['CLIPDROP_API_KEY'] = '1143a102dbe21628248d4bb992b391a49dc058c584181ea72e17c2ccd49be9ca69ccf4a2b97fc82c89ff1029578abbea'
|
| 9 |
os.environ['STABILITY_API_KEY'] = 'sk-GBmsWR78MmCSAWGkkC1CFgWgE6GPgV00pNLJlxlyZWyT3QQO'
|
| 10 |
+
os.environ['REPLICATE_API_TOKEN'] = 'r8_3V5WKOBwbbuL0DQGMliP0972IAVIBo62Lmi8I'
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Importing Replicate and Stability SDK libraries
|
| 14 |
import replicate
|