LPX55 commited on
Commit
c541413
Β·
verified Β·
1 Parent(s): 7fe0752

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,12 +4,12 @@ from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
4
  from qwen_vl_utils import process_vision_info
5
  from PIL import Image
6
  import torch
7
- import os
8
 
9
  # Load the model and processor
10
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
11
  "daniel3303/QwenStoryteller",
12
- torch_dtype="auto",
13
  device_map="auto"
14
  )
15
  processor = AutoProcessor.from_pretrained("daniel3303/QwenStoryteller")
@@ -87,4 +87,4 @@ with gr.Blocks() as demo:
87
  gen_button.click(generate_story, upload_button, outputs)
88
 
89
  if __name__ == "__main__":
90
- demo.launch()
 
4
  from qwen_vl_utils import process_vision_info
5
  from PIL import Image
6
  import torch
7
+ import os, time
8
 
9
  # Load the model and processor
10
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
11
  "daniel3303/QwenStoryteller",
12
+ torch_dtype=torch.float16,
13
  device_map="auto"
14
  )
15
  processor = AutoProcessor.from_pretrained("daniel3303/QwenStoryteller")
 
87
  gen_button.click(generate_story, upload_button, outputs)
88
 
89
  if __name__ == "__main__":
90
+ demo.queue().launch(show_errors=True)