Cylanoid commited on
Commit
53d6f71
·
1 Parent(s): 1c042ed
app.py CHANGED
@@ -64,17 +64,17 @@ def train_ui_tars(file):
64
  trainer.train()
65
 
66
  # Step 5: Save the model
67
- model.save_pretrained("./fine_tuned_llama2")
68
- tokenizer.save_pretrained("./fine_tuned_llama2")
69
 
70
- return "Training completed successfully! Model saved to ./fine_tuned_llama2"
71
 
72
  except Exception as e:
73
  return f"Error: {str(e)}"
74
 
75
  # Gradio UI
76
  with gr.Blocks(title="Model Fine-Tuning Interface") as demo:
77
- gr.Markdown("# OPT-350M Fine-Tuning UI")
78
  gr.Markdown("Upload a JSON file with 'input' and 'output' pairs to fine-tune the model on your fraud dataset.")
79
 
80
  file_input = gr.File(label="Upload Fraud Dataset (JSON)")
 
64
  trainer.train()
65
 
66
  # Step 5: Save the model
67
+ model.save_pretrained("train_llama.py")
68
+ tokenizer.save_pretrained("./train_llama.py")
69
 
70
+ return "Training completed successfully! Model saved to ./train_llama.py"
71
 
72
  except Exception as e:
73
  return f"Error: {str(e)}"
74
 
75
  # Gradio UI
76
  with gr.Blocks(title="Model Fine-Tuning Interface") as demo:
77
+ gr.Markdown("train_llama.py")
78
  gr.Markdown("Upload a JSON file with 'input' and 'output' pairs to fine-tune the model on your fraud dataset.")
79
 
80
  file_input = gr.File(label="Upload Fraud Dataset (JSON)")
final_combined_fraud_data (2).json → final_combined_fraud_data.json RENAMED
File without changes
requirements.txt CHANGED
@@ -1,4 +1,7 @@
1
  torch
2
  transformers
3
  datasets
4
- gradio
 
 
 
 
1
  torch
2
  transformers
3
  datasets
4
+ gradio
5
+ peft
6
+ accelerate
7
+ bitsandbytes
train_llama.py → train.py RENAMED
File without changes