import gradio as gr import os import spaces from transformers import GemmaTokenizer, AutoModelForCausalLM from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer from threading import Thread # Set an environment variable HF_TOKEN = os.environ.get("HF_TOKEN", None) DESCRIPTION = '''
LLaMA-Mesh: Unifying 3D Mesh Generation with Language Models.
Notice: (1) This demo supports up to 4096 tokens due to computational limits, while our full model supports 8k tokens. This limitation may result in incomplete generated meshes. To experience the full 8k token context, please run our model locally.
(2) We only support generating a single mesh per dialog round. To generate another mesh, click the "clear" button and start a new dialog.
(3) If the LLM refuses to generate a 3D mesh, try adding more explicit instructions to the prompt, such as "create a 3D model of a table in OBJ format." A more effective approach is to request the mesh generation at the start of the dialog.
Ask me anything...