|
import gradio as gr |
|
import pandas as pd |
|
import umap |
|
import matplotlib.pyplot as plt |
|
import os |
|
import tempfile |
|
import scanpy as sc |
|
import argparse |
|
import subprocess |
|
from io import BytesIO |
|
from evaluate import AnndataProcessor |
|
from accelerate import Accelerator |
|
from huggingface_hub import hf_hub_download |
|
|
|
|
|
def main(input_file_path, species): |
|
|
|
|
|
os.system('git clone https://github.com/minwoosun/UCE.git') |
|
os.chdir('UCE') |
|
|
|
|
|
script_name = "eval_single_anndata.py" |
|
args = ["--adata_path", input_file_path, "--dir", "./", "--model_loc", "minwoosun/uce-100m"] |
|
command = ["python", script_name] + args |
|
|
|
try: |
|
result = subprocess.run(command, capture_output=True, text=True, check=True) |
|
print(result.stdout) |
|
print(result.stderr) |
|
except subprocess.CalledProcessError as e: |
|
print(f"Error executing command: {e}") |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
|
|
|
|