Spaces:
Running
Running
Update app_parquet.py
Browse files- app_parquet.py +2 -2
app_parquet.py
CHANGED
@@ -187,14 +187,14 @@ PARQUET_DATASET_DIR.mkdir(parents=True, exist_ok=True)
|
|
187 |
scheduler = ParquetScheduler(repo_id="example-space-to-dataset-parquet")
|
188 |
|
189 |
# client = Client("stabilityai/stable-diffusion") # Space is paused
|
190 |
-
client = Client("
|
191 |
|
192 |
|
193 |
def generate(prompt: str) -> tuple[str, list[str]]:
|
194 |
"""Generate images on 'submit' button."""
|
195 |
# Generate from https://huggingface.co/spaces/stabilityai/stable-diffusion
|
196 |
# out_dir = client.predict(prompt, "", 9, fn_index=1) # Space 'stabilityai/stable-diffusion' is paused
|
197 |
-
out_dir = client.predict(prompt,
|
198 |
with (Path(out_dir) / "captions.json").open() as f:
|
199 |
paths = list(json.load(f).keys())
|
200 |
|
|
|
187 |
scheduler = ParquetScheduler(repo_id="example-space-to-dataset-parquet")
|
188 |
|
189 |
# client = Client("stabilityai/stable-diffusion") # Space is paused
|
190 |
+
client = Client("black-forest-labs/FLUX.1-dev")
|
191 |
|
192 |
|
193 |
def generate(prompt: str) -> tuple[str, list[str]]:
|
194 |
"""Generate images on 'submit' button."""
|
195 |
# Generate from https://huggingface.co/spaces/stabilityai/stable-diffusion
|
196 |
# out_dir = client.predict(prompt, "", 9, fn_index=1) # Space 'stabilityai/stable-diffusion' is paused
|
197 |
+
out_dir = client.predict(prompt, api_name="/infer")
|
198 |
with (Path(out_dir) / "captions.json").open() as f:
|
199 |
paths = list(json.load(f).keys())
|
200 |
|