Skip to content

Commit

Permalink
ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shariqm-modal committed Dec 4, 2024
1 parent 4386f37 commit 592cb6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions 06_gpu_and_ml/protein_fold/protein_fold.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
# ## Basic Setup

import logging as L
import modal
from pathlib import Path
import time

import modal

MINUTES = 60 # seconds

Expand Down Expand Up @@ -105,22 +105,23 @@


with esm3_image.imports():
import torch
from esm.models.esm3 import ESM3
from esm.sdk.api import ESM3InferenceClient, ESMProtein, GenerationConfig
import torch


with web_app_image.imports():
from py3DmolWrapper import py3DMolViewWrapper

import os

import biotite.database.rcsb as rcsb
import biotite.structure as b_structure
import biotite.structure.io.pdbx as pdbx
from biotite.structure.io.pdbx import CIFFile

from esm.sdk.api import ESMProtein

from py3DmolWrapper import py3DMolViewWrapper

# ## Defining a `Model` inference class for ESM3

# Next, we map the model's setup and inference code onto Modal.
Expand Down Expand Up @@ -209,10 +210,9 @@ def inference(self, sequence: str) -> bool:
)
@modal.asgi_app()
def protein_fold_fastapi_app():
import gradio as gr
from fastapi import FastAPI
from fastapi.responses import FileResponse

import gradio as gr
from gradio.routes import mount_gradio_app

width, height = 400, 400
Expand Down
3 changes: 2 additions & 1 deletion 06_gpu_and_ml/protein_fold/py3DmolWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# https://www.biostat.jhsph.edu/~iruczins/teaching/260.655/links/pdbformat.pdf


from dataclasses import dataclass
import logging as L
from dataclasses import dataclass

import numpy as np
import py3Dmol

Expand Down

0 comments on commit 592cb6f

Please sign in to comment.