yejunliang23 commited on
Commit
3abec55
·
verified ·
1 Parent(s): c9a6769

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,11 +1,9 @@
 
1
  import os
2
- os.environ["TOKENIZERS_PARALLELISM"] = "false"
3
  import spaces
4
  import subprocess
5
- import os
6
  import torch
7
  from threading import Thread
8
- import gradio as gr
9
  from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor,TextIteratorStreamer,AutoTokenizer
10
  from qwen_vl_utils import process_vision_info
11
  from trellis.pipelines import TrellisImageTo3DPipeline,TrellisTextTo3DPipeline
@@ -21,7 +19,12 @@ import random
21
  import open3d as o3d
22
  from huggingface_hub import hf_hub_download
23
  import numpy as np
 
24
 
 
 
 
 
25
  def _remove_image_special(text):
26
  text = text.replace('<ref>', '').replace('</ref>', '')
27
  return re.sub(r'<box>.*?(</box>|$)', '', text)
 
1
+ import gradio as gr
2
  import os
 
3
  import spaces
4
  import subprocess
 
5
  import torch
6
  from threading import Thread
 
7
  from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor,TextIteratorStreamer,AutoTokenizer
8
  from qwen_vl_utils import process_vision_info
9
  from trellis.pipelines import TrellisImageTo3DPipeline,TrellisTextTo3DPipeline
 
19
  import open3d as o3d
20
  from huggingface_hub import hf_hub_download
21
  import numpy as np
22
+ HF_TOKEN = os.environ.get("HF_TOKEN", None)
23
 
24
+ import torch
25
+ print("CUDA available:", torch.cuda.is_available())
26
+ print("CUDA device count:", torch.cuda.device_count())
27
+ 1/0
28
  def _remove_image_special(text):
29
  text = text.replace('<ref>', '').replace('</ref>', '')
30
  return re.sub(r'<box>.*?(</box>|$)', '', text)