zhiqiulin commited on
Commit
68d8a12
·
verified ·
1 Parent(s): 58ed5ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,7 @@
1
  import gradio as gr
2
  import spaces
3
 
4
- import torch
5
- torch.jit.script = lambda f: f
6
  # torch.autocast = lambda device_type, dtype: torch.autocast(device_type, torch.float)
7
 
8
  # Initialize the model only once
@@ -12,6 +11,8 @@ torch.jit.script = lambda f: f
12
 
13
  @spaces.GPU
14
  def generate(model_name, image, text):
 
 
15
 
16
  from t2v_metrics import VQAScore, list_all_vqascore_models
17
 
 
1
  import gradio as gr
2
  import spaces
3
 
4
+
 
5
  # torch.autocast = lambda device_type, dtype: torch.autocast(device_type, torch.float)
6
 
7
  # Initialize the model only once
 
11
 
12
  @spaces.GPU
13
  def generate(model_name, image, text):
14
+ import torch
15
+ torch.jit.script = lambda f: f
16
 
17
  from t2v_metrics import VQAScore, list_all_vqascore_models
18