RamAnanth1 commited on
Commit
005b6c9
·
verified ·
1 Parent(s): 201fa8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,15 +13,17 @@ def run(image, model_name):
13
  file_path = "temp.png"
14
  image.save(file_path)
15
  print(file_path)
16
- if model_name=='Shap-E':
 
17
  result = shap_e_client.predict(
18
  file_path, # filepath in 'Input image' Image component
19
  0, # float (numeric value between 0 and 2147483647) in 'Seed' Slider component
20
  1, # float (numeric value between 1 and 20) in 'Guidance scale' Slider component
21
  2, # float (numeric value between 2 and 100) in 'Number of inference steps' Slider component
22
  api_name="/image-to-3d")
 
23
 
24
- elif model_name=='TripoSR':
25
 
26
  process_result = triposr_client.predict(
27
  image, # filepath in 'Input Image' Image component
 
13
  file_path = "temp.png"
14
  image.save(file_path)
15
  print(file_path)
16
+ model_name = model_name.lower()
17
+ if model_name=='shap-e':
18
  result = shap_e_client.predict(
19
  file_path, # filepath in 'Input image' Image component
20
  0, # float (numeric value between 0 and 2147483647) in 'Seed' Slider component
21
  1, # float (numeric value between 1 and 20) in 'Guidance scale' Slider component
22
  2, # float (numeric value between 2 and 100) in 'Number of inference steps' Slider component
23
  api_name="/image-to-3d")
24
+ print(result)
25
 
26
+ elif model_name=='triposr':
27
 
28
  process_result = triposr_client.predict(
29
  image, # filepath in 'Input Image' Image component