sf-d7c / index.html
Juno360219's picture
Update index.html
9825e46
<html><head><link href="https://cdn.jsdelivr.net/npm/daisyui@3.1.6/dist/full.css" rel="stylesheet" type="text/css" /><script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script><script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script><script defer src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.156.1/three.min.js"></script><script type="module" src="main.js"></script><title>3D Model Viewer</title></head><body>
<article class="prose">
<section>
<h1>3D Model Viewer</h1>
<p>Upload an image to convert it to a 3D model.</p>
<p>
<input type="file" class="underline" placeholder="Select an image" id="inputFile" />
<button id="uploadButton">Upload</button>
</p>
<p id="3dModel"></p>
</section>
</article>
</body></html>
from hugging_face import image_to_3d
from pip import install
import os
from os.path import expandvars
install(os)
img_to_3d = image_to_3d(expandvars('%s.jpg'))
print(img_to_3d.jpg_text)