Spaces:
Paused
Paused
Update test_app.py
Browse files10 unmodified lines111213141516171819202122232425262728293010 unmodified linesfrom pathlib import Pathfrom predictor import EagleBlendPredictorimport torch# Give torch.classes a benign __path__ so Streamlit won't trigger __getattr__.try:setattr(torch.classes, "__path__", [])except Exception:# Fallback wrapper if direct setattr isn't allowed in your buildclass _TorchClassesWrapper:def __init__(self, obj):self._obj = objself.__path__ = []def __getattr__(self, name):return getattr(self._obj, name)torch.classes = _TorchClassesWrapper(torch.classes)import streamlit as st10 unmodified lines111213141516171819202122232425262728293010 unmodified linesfrom pathlib import Pathfrom predictor import EagleBlendPredictor# import torch# # Give torch.classes a benign __path__ so Streamlit won't trigger __getattr__.# try:# setattr(torch.classes, "__path__", [])# except Exception:# # Fallback wrapper if direct setattr isn't allowed in your build# class _TorchClassesWrapper:# def __init__(self, obj):# self._obj = obj# self.__path__ = []# def __getattr__(self, name):# return getattr(self._obj, name)# torch.classes = _TorchClassesWrapper(torch.classes)import streamlit as st
test_app.py+14-14