Update app/main.py
Browse files- app/main.py +8 -13
app/main.py
CHANGED
|
@@ -18,7 +18,7 @@ app.add_middleware(
|
|
| 18 |
)
|
| 19 |
|
| 20 |
# Connect to the model
|
| 21 |
-
client = Client("
|
| 22 |
|
| 23 |
@app.get("/")
|
| 24 |
def root():
|
|
@@ -40,18 +40,13 @@ def generate_image(
|
|
| 40 |
):
|
| 41 |
try:
|
| 42 |
result = client.predict(
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
upscale_factor=upscale_factor,
|
| 51 |
-
process_upscale=process_upscale,
|
| 52 |
-
lora_model=lora_model,
|
| 53 |
-
process_lora=process_lora,
|
| 54 |
-
api_name="/gen"
|
| 55 |
)
|
| 56 |
|
| 57 |
# result is a list of local file paths
|
|
|
|
| 18 |
)
|
| 19 |
|
| 20 |
# Connect to the model
|
| 21 |
+
client = Client("NihalGazi/FLUX-Pro-Unlimited")
|
| 22 |
|
| 23 |
@app.get("/")
|
| 24 |
def root():
|
|
|
|
| 40 |
):
|
| 41 |
try:
|
| 42 |
result = client.predict(
|
| 43 |
+
prompt=prompt,
|
| 44 |
+
width=1280,
|
| 45 |
+
height=1280,
|
| 46 |
+
seed=0,
|
| 47 |
+
randomize=True,
|
| 48 |
+
server_choice="NSFW-Core: Uncensored Server 2",
|
| 49 |
+
api_name="/generate_image"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
)
|
| 51 |
|
| 52 |
# result is a list of local file paths
|