Update app.py
Browse files
app.py
CHANGED
|
@@ -5,9 +5,11 @@ import os
|
|
| 5 |
import time
|
| 6 |
import traceback
|
| 7 |
|
|
|
|
|
|
|
| 8 |
repos = [
|
| 9 |
"hsuwill000/LCM_SoteMix_OpenVINO_CPU_Space_TAESD",
|
| 10 |
-
"
|
| 11 |
]
|
| 12 |
|
| 13 |
# Counter for image filenames to avoid overwriting
|
|
@@ -18,7 +20,7 @@ repo_index = 0 # This will keep track of the current repository
|
|
| 18 |
def infer_gradio(prompt: str):
|
| 19 |
global count, repo_index
|
| 20 |
# Create a Client instance to communicate with the Hugging Face space
|
| 21 |
-
client = Client(repos[repo_index])
|
| 22 |
|
| 23 |
# Prepare the inputs for the prediction
|
| 24 |
inputs = {
|
|
|
|
| 5 |
import time
|
| 6 |
import traceback
|
| 7 |
|
| 8 |
+
api_key = os.getenv('MY_API_KEY')
|
| 9 |
+
|
| 10 |
repos = [
|
| 11 |
"hsuwill000/LCM_SoteMix_OpenVINO_CPU_Space_TAESD",
|
| 12 |
+
"hsuwill000/LCM_SoteMix_OpenVINO_CPU_Space_TAESD_0"
|
| 13 |
]
|
| 14 |
|
| 15 |
# Counter for image filenames to avoid overwriting
|
|
|
|
| 20 |
def infer_gradio(prompt: str):
|
| 21 |
global count, repo_index
|
| 22 |
# Create a Client instance to communicate with the Hugging Face space
|
| 23 |
+
client = Client(repos[repo_index], api_key=api_key)
|
| 24 |
|
| 25 |
# Prepare the inputs for the prediction
|
| 26 |
inputs = {
|