Commit bb35fdd0 authored by duanjinfei's avatar duanjinfei

update cog.yaml

parent 001ac803
...@@ -59,8 +59,6 @@ build: ...@@ -59,8 +59,6 @@ build:
# commands run after the environment is setup # commands run after the environment is setup
run: run:
- "pip install torch==2.0.1 torchvision==0.15.2" - "pip install torch==2.0.1 torchvision==0.15.2"
- 'wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;bash miniconda.sh -b -p $HOME/miniconda3;export PATH="$HOME/miniconda3/bin:$PATH";conda --version'
- "git clone https://github.com/lllyasviel/ControlNet.git;cd ControlNet;conda env create -f environment.yaml;conda activate control"
- "echo env is ready!" - "echo env is ready!"
- "echo another command if needed" - "echo another command if needed"
......
# Prediction interface for Cog ⚙️ # Prediction interface for Cog ⚙️
# https://cog.run/python # https://cog.run/python
from modelscope import snapshot_download
from cog import BasePredictor, Input, Path from cog import BasePredictor, Input, Path
from typing import List from typing import List
from modelscope.pipelines import pipeline from modelscope.pipelines import pipeline
...@@ -16,8 +17,9 @@ params = { ...@@ -16,8 +17,9 @@ params = {
class Predictor(BasePredictor): class Predictor(BasePredictor):
def setup(self) -> None: def setup(self) -> None:
model_dir = snapshot_download('iic/cv_anytext_text_generation_editing')
self.model = pipeline('my-anytext-task', self.model = pipeline('my-anytext-task',
model='damo/cv_anytext_text_generation_editing', model_revision='v1.1.3') model=model_dir, model_revision='v1.1.3')
def predict( def predict(
self, self,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment