Kevin Fink commited on
Commit
bc63b44
·
1 Parent(s): 229da9e
Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +1 -0
app.py CHANGED
@@ -1,8 +1,10 @@
 
1
  import gradio as gr
2
  from transformers import Trainer, TrainingArguments, AutoTokenizer, AutoModelForSeq2SeqLM
3
  from datasets import load_dataset
4
  import traceback
5
 
 
6
  def fine_tune_model(model_name, dataset_name, hub_id, num_epochs, batch_size, lr, grad):
7
  try:
8
 
 
1
+ import spaces
2
  import gradio as gr
3
  from transformers import Trainer, TrainingArguments, AutoTokenizer, AutoModelForSeq2SeqLM
4
  from datasets import load_dataset
5
  import traceback
6
 
7
+ @spaces.GPU
8
  def fine_tune_model(model_name, dataset_name, hub_id, num_epochs, batch_size, lr, grad):
9
  try:
10
 
requirements.txt CHANGED
@@ -1,2 +1,3 @@
 
1
  transformers
2
  datasets
 
1
+ spaces
2
  transformers
3
  datasets