Spaces:
Runtime error
Runtime error
Commit ·
34c16bd
1
Parent(s): a284f57
cuda bug
Browse files15 unmodified lines1617181920212223242526272021282930313242 unmodified lines75767770717278798081828315 unmodified lines
class RetrievalApp: def is_cuda_available(self): try: t = torch.Tensor([1]).cuda() except: return False finally: return True
def get_device_options(self): if torch.cuda.is_available: return ["cuda", "cpu"] if self.is_cuda_available(): return ["cpu", "cuda"] else: return ["cpu"]
42 unmodified lines st.table(get_repos_with_descriptions(retrieval_pipe.X_df, task_repos)) with st.spinner(text="fetching results"): st.write( retrieval_pipe.search(query, k, description_length, additional_shown_cols).to_html( escape=False, index=False ), retrieval_pipe.search( query, k, description_length, additional_shown_cols ).to_html(escape=False, index=False), unsafe_allow_html=True, ) print("finished retrieval")app_implementation.py+13-5