Spaces:
Sleeping
Sleeping
abrakjamson
commited on
Commit
·
187b738
1
Parent(s):
a7d5317
zerogpu for training
Browse files
app.py
CHANGED
|
@@ -386,6 +386,7 @@ def make_dataset(
|
|
| 386 |
)
|
| 387 |
return dataset
|
| 388 |
|
|
|
|
| 389 |
def train_model_persona(positive_text, negative_text):
|
| 390 |
positive_list = positive_text.split('\n')
|
| 391 |
negative_list = negative_text.split('\n')
|
|
@@ -775,11 +776,11 @@ with gr.Blocks(
|
|
| 775 |
with gr.Tab(
|
| 776 |
label="Train"
|
| 777 |
):
|
| 778 |
-
gr.Markdown("#
|
| 779 |
with gr.Row():
|
| 780 |
with gr.Column():
|
| 781 |
gr.Markdown("## Persona Method")
|
| 782 |
-
gr.Markdown("Fill in the blank with three synonyms of the persona on newlines, and then three antonyms \"Act as if you are an extremely (persona) person\"")
|
| 783 |
persona_input_positive = gr.Text(
|
| 784 |
lines=3,
|
| 785 |
label="Positive",
|
|
@@ -796,7 +797,7 @@ with gr.Blocks(
|
|
| 796 |
|
| 797 |
with gr.Column():
|
| 798 |
gr.Markdown("## Facts method")
|
| 799 |
-
gr.Markdown("Fill in the blank with a persona and its opposite within, \"Pretend to be a (persona) making statements about the world.\"")
|
| 800 |
facts_input_positive = gr.Text(
|
| 801 |
label="Positive",
|
| 802 |
placeholder="time traveler from the future")
|
|
|
|
| 386 |
)
|
| 387 |
return dataset
|
| 388 |
|
| 389 |
+
@spaces.GPU
|
| 390 |
def train_model_persona(positive_text, negative_text):
|
| 391 |
positive_list = positive_text.split('\n')
|
| 392 |
negative_list = negative_text.split('\n')
|
|
|
|
| 776 |
with gr.Tab(
|
| 777 |
label="Train"
|
| 778 |
):
|
| 779 |
+
gr.Markdown("# 💪 Train a new control vector")
|
| 780 |
with gr.Row():
|
| 781 |
with gr.Column():
|
| 782 |
gr.Markdown("## Persona Method")
|
| 783 |
+
gr.Markdown("Fill in the blank with three synonyms of the persona on newlines, and then three antonyms that work in this sentence, \"Act as if you are an extremely (persona) person\"")
|
| 784 |
persona_input_positive = gr.Text(
|
| 785 |
lines=3,
|
| 786 |
label="Positive",
|
|
|
|
| 797 |
|
| 798 |
with gr.Column():
|
| 799 |
gr.Markdown("## Facts method")
|
| 800 |
+
gr.Markdown("Fill in the blank with a persona and its opposite that work within this sentence, \"Pretend to be a (persona) making statements about the world.\"")
|
| 801 |
facts_input_positive = gr.Text(
|
| 802 |
label="Positive",
|
| 803 |
placeholder="time traveler from the future")
|