prithivMLmods commited on
Commit
39b1840
·
verified ·
1 Parent(s): 56aa407

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -340,13 +340,8 @@ def generate(
340
  new_filename = f"mesh_{uuid.uuid4()}.glb"
341
  new_filepath = os.path.join(static_folder, new_filename)
342
  shutil.copy(glb_path, new_filepath)
343
- # Reference the file via a relative URL.
344
- html_output = f'''
345
- <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
346
- <model-viewer src="/static/{new_filename}" alt="3D Model" auto-rotate camera-controls
347
- style="width: 100%; height: 400px;"></model-viewer>
348
- '''
349
- yield gr.HTML(html_output)
350
  return
351
 
352
  # --- Image Generation branch ---
 
340
  new_filename = f"mesh_{uuid.uuid4()}.glb"
341
  new_filepath = os.path.join(static_folder, new_filename)
342
  shutil.copy(glb_path, new_filepath)
343
+
344
+ yield gr.File(new_filepath)
 
 
 
 
 
345
  return
346
 
347
  # --- Image Generation branch ---