Zanflip commited on
Commit
9ebbc97
·
verified ·
1 Parent(s): 9968ab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -8,6 +8,7 @@ import uuid
8
  os.environ["REPLICATE_API_TOKEN"] = "r8_FqBcLY8OR6F3Fsf4D4fT415tb1CN3790UGzYE"
9
 
10
  def generate_3d(prompt):
 
11
  try:
12
  output = replicate.run(
13
  "openai/shap-e:9c9ecb8d35d0cc0ecde68b8a0d4a2f94f2bc6ee9393e8c3d76c44d7c0d75b1f9",
@@ -17,7 +18,8 @@ def generate_3d(prompt):
17
  "num_inference_steps": 64
18
  }
19
  )
20
- print("Replicate output:", output)
 
21
 
22
  if not output or not isinstance(output, list):
23
  return "Error: No model output."
@@ -36,7 +38,6 @@ def generate_3d(prompt):
36
 
37
  except Exception as e:
38
  return f"Generation failed: {str(e)}"
39
-
40
  with gr.Blocks() as demo:
41
  gr.Markdown("## 3D Model Generator (Text to 3D)")
42
  prompt = gr.Textbox(label="Prompt", placeholder="e.g. A sci-fi sword")
 
8
  os.environ["REPLICATE_API_TOKEN"] = "r8_FqBcLY8OR6F3Fsf4D4fT415tb1CN3790UGzYE"
9
 
10
  def generate_3d(prompt):
11
+ print("Prompt received:", prompt) # Check if button works
12
  try:
13
  output = replicate.run(
14
  "openai/shap-e:9c9ecb8d35d0cc0ecde68b8a0d4a2f94f2bc6ee9393e8c3d76c44d7c0d75b1f9",
 
18
  "num_inference_steps": 64
19
  }
20
  )
21
+
22
+ print("Replicate output:", output) # See what the model gives
23
 
24
  if not output or not isinstance(output, list):
25
  return "Error: No model output."
 
38
 
39
  except Exception as e:
40
  return f"Generation failed: {str(e)}"
 
41
  with gr.Blocks() as demo:
42
  gr.Markdown("## 3D Model Generator (Text to 3D)")
43
  prompt = gr.Textbox(label="Prompt", placeholder="e.g. A sci-fi sword")