Yehor commited on
Commit
be7f41a
·
verified ·
1 Parent(s): cb45d03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,6 +1,10 @@
1
  import spaces
2
 
3
  import torch
 
 
 
 
4
 
5
  import gradio as gr
6
 
@@ -19,9 +23,6 @@ model = AutoModelForCausalLM.from_pretrained(
19
 
20
  # model = torch.compile(model, backend="eager")
21
 
22
- import torch._dynamo
23
- # torch._dynamo.config.suppress_errors = True
24
- torch._dynamo.disable()
25
 
26
  print('Model dtype:', model.dtype)
27
 
 
1
  import spaces
2
 
3
  import torch
4
+ import torch._dynamo
5
+ # torch._dynamo.config.suppress_errors = True
6
+ torch._dynamo.disable()
7
+ torch._dynamo.disallow_in_graph()
8
 
9
  import gradio as gr
10
 
 
23
 
24
  # model = torch.compile(model, backend="eager")
25
 
 
 
 
26
 
27
  print('Model dtype:', model.dtype)
28