import os import sys import glob # Needed? import json # needed? import zipfile # needed? import numpy as np import pandas as pd import streamlit as st from tqdm import tqdm from itertools import chain # needed? import torch from torch.utils.data import DataLoader from rdkit import Chem from rdkit.Chem import Draw from rdkit.Chem import AllChem from rdkit.Chem import DataStructs sys.path.insert(0, os.path.abspath("src/")) st.set_page_config(layout="wide") basepath = os.path.dirname(__file__) datapath = os.path.join(basepath, "data") device = "cuda" if torch.cuda.is_available() else "cpu" st.title('HyperDTI: Task-conditioned modeling of drug-target interactions.') def about_page(): st.markdown( """ HyperNetworks have been established as an effective technique to achieve fast adaptation of parameters for neural networks. Recently, HyperNetwork predictions conditioned on descriptors of tasks have improved multi-task generalization in various domains, such as personalized federated learning and neural architecture search. Especially powerful results were achieved in few- and zero-shot settings, attributed to the increased information sharing by the HyperNetwork. With the rise of new diseases fast discovery of drugs is needed which requires models that are able to generalize drug-target interaction predictions in low-data scenarios. In this work, we propose the HyperPCM model, a task-conditioned HyperNetwork approach for the problem of predicting drug-target interactions in drug discovery. Our model learns to generate a QSAR model specialized on a given protein target. We demonstrate state-of-the-art performance over previous methods on multiple well-known benchmarks, particularly in zero-shot settings for unseen protein targets. """ ) page_names_to_func = { 'About': about_page } selected_page = st.sidebar.selectbox('Choose function', page_names_to_func) page_names_to_func[selected_page]()