Fraser commited on
Commit
64b1dd3
·
1 Parent(s): 1c32867

fix space calls

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -272,13 +272,13 @@ class PicletGeneratorService:
272
 
273
  print(f"Generating caption for image...")
274
  result = client.predict(
275
- "/stream_chat",
276
  handle_file(image_path), # Wrap path so client uploads file
277
  "Descriptive", # caption_type
278
  "medium-length", # caption_length
279
  [], # extra_options
280
  "", # name_input
281
- "Describe this image in detail, identifying any recognizable objects, brands, logos, or specific models. Be specific about product names and types." # custom_prompt
 
282
  )
283
 
284
  # JoyCaption returns tuple: (prompt_used, caption_text) in .data
@@ -303,11 +303,11 @@ class PicletGeneratorService:
303
 
304
  print(f"Generating text...")
305
  result = client.predict(
306
- "/chat",
307
  prompt, # message
308
  [], # history
309
  "You are a helpful assistant that creates Pokemon-style monster concepts based on real-world objects.", # system_prompt
310
- 0.7 # temperature
 
311
  )
312
 
313
  # Extract response text (GPT-OSS formats with Analysis and Response)
@@ -491,13 +491,13 @@ CRITICAL RULES:
491
 
492
  print(f"Generating image with prompt: {full_prompt[:100]}...")
493
  result = client.predict(
494
- "/infer",
495
  full_prompt, # prompt
496
  0, # seed
497
  True, # randomize_seed
498
  1024, # width
499
  1024, # height
500
- 4 # num_inference_steps
 
501
  )
502
 
503
  # Extract image URL and seed
 
272
 
273
  print(f"Generating caption for image...")
274
  result = client.predict(
 
275
  handle_file(image_path), # Wrap path so client uploads file
276
  "Descriptive", # caption_type
277
  "medium-length", # caption_length
278
  [], # extra_options
279
  "", # name_input
280
+ "Describe this image in detail, identifying any recognizable objects, brands, logos, or specific models. Be specific about product names and types.", # custom_prompt
281
+ api_name="/stream_chat"
282
  )
283
 
284
  # JoyCaption returns tuple: (prompt_used, caption_text) in .data
 
303
 
304
  print(f"Generating text...")
305
  result = client.predict(
 
306
  prompt, # message
307
  [], # history
308
  "You are a helpful assistant that creates Pokemon-style monster concepts based on real-world objects.", # system_prompt
309
+ 0.7, # temperature
310
+ api_name="/chat"
311
  )
312
 
313
  # Extract response text (GPT-OSS formats with Analysis and Response)
 
491
 
492
  print(f"Generating image with prompt: {full_prompt[:100]}...")
493
  result = client.predict(
 
494
  full_prompt, # prompt
495
  0, # seed
496
  True, # randomize_seed
497
  1024, # width
498
  1024, # height
499
+ 4, # num_inference_steps
500
+ api_name="/infer"
501
  )
502
 
503
  # Extract image URL and seed