Commit Β·
e9b30e4
1
Parent(s): fd92630
Update app.py
Browse files
app.py
CHANGED
|
@@ -324,8 +324,7 @@ def calculate_price(iterations):
|
|
| 324 |
cost_per_second = 1.05/60/60
|
| 325 |
cost = round(cost_per_second * total_seconds, 2)
|
| 326 |
return f'''To train this LoRA, we will duplicate the space and hook an A10G GPU under the hood.
|
| 327 |
-
## Estimated to cost <b>< US$ {str(cost)}</b> with your current train settings <small>({int(iterations)} iterations at 3.50s/it
|
| 328 |
-
#### To continue, grab you <b>write</b> token [here](https://huggingface.co/settings/tokens) and enter it below β'''
|
| 329 |
|
| 330 |
def start_training_og(
|
| 331 |
lora_name,
|
|
@@ -835,11 +834,10 @@ with gr.Blocks(css=css, theme=theme) as demo:
|
|
| 835 |
output_components.insert(1, cost_estimation)
|
| 836 |
gr.on(
|
| 837 |
triggers=[
|
| 838 |
-
|
| 839 |
payment_setup.click
|
| 840 |
],
|
| 841 |
fn=check_token,
|
| 842 |
-
#inputs=token,
|
| 843 |
outputs=[no_payment_method, start],
|
| 844 |
concurrency_limit=50
|
| 845 |
)
|
|
|
|
| 324 |
cost_per_second = 1.05/60/60
|
| 325 |
cost = round(cost_per_second * total_seconds, 2)
|
| 326 |
return f'''To train this LoRA, we will duplicate the space and hook an A10G GPU under the hood.
|
| 327 |
+
## Estimated to cost <b>< US$ {str(cost)}</b> for {round(int(total_seconds)/60, 2)} minutes with your current train settings <small>({int(iterations)} iterations at 3.50s/it)</small>'''
|
|
|
|
| 328 |
|
| 329 |
def start_training_og(
|
| 330 |
lora_name,
|
|
|
|
| 834 |
output_components.insert(1, cost_estimation)
|
| 835 |
gr.on(
|
| 836 |
triggers=[
|
| 837 |
+
images.upload,
|
| 838 |
payment_setup.click
|
| 839 |
],
|
| 840 |
fn=check_token,
|
|
|
|
| 841 |
outputs=[no_payment_method, start],
|
| 842 |
concurrency_limit=50
|
| 843 |
)
|