Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cog-anytext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanjinfei
cog-anytext
Commits
bb35fdd0
Commit
bb35fdd0
authored
Jul 17, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cog.yaml
parent
001ac803
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cog.yaml
cog.yaml
+0
-2
predict.py
predict.py
+3
-1
No files found.
cog.yaml
View file @
bb35fdd0
...
@@ -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"
...
...
predict.py
View file @
bb35fdd0
# 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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment