wayne-chi commited on
Commit
7e04ac5
·
verified ·
1 Parent(s): 211bb72

Update test_app.py

Browse files
Files changed (1) hide show
  1. test_app.py +14 -14
test_app.py CHANGED
@@ -11,20 +11,20 @@ import re
11
  from pathlib import Path
12
  from predictor import EagleBlendPredictor
13
 
14
- import torch
15
-
16
- # Give torch.classes a benign __path__ so Streamlit won't trigger __getattr__.
17
- try:
18
- setattr(torch.classes, "__path__", [])
19
- except Exception:
20
- # Fallback wrapper if direct setattr isn't allowed in your build
21
- class _TorchClassesWrapper:
22
- def __init__(self, obj):
23
- self._obj = obj
24
- self.__path__ = []
25
- def __getattr__(self, name):
26
- return getattr(self._obj, name)
27
- torch.classes = _TorchClassesWrapper(torch.classes)
28
 
29
  import streamlit as st
30
 
 
11
  from pathlib import Path
12
  from predictor import EagleBlendPredictor
13
 
14
+ # import torch
15
+
16
+ # # Give torch.classes a benign __path__ so Streamlit won't trigger __getattr__.
17
+ # try:
18
+ # setattr(torch.classes, "__path__", [])
19
+ # except Exception:
20
+ # # Fallback wrapper if direct setattr isn't allowed in your build
21
+ # class _TorchClassesWrapper:
22
+ # def __init__(self, obj):
23
+ # self._obj = obj
24
+ # self.__path__ = []
25
+ # def __getattr__(self, name):
26
+ # return getattr(self._obj, name)
27
+ # torch.classes = _TorchClassesWrapper(torch.classes)
28
 
29
  import streamlit as st
30