initial commit
This commit is contained in:
17
gemini_trainer.py
Normal file
17
gemini_trainer.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import json
|
||||
import csv
|
||||
GEMINI_API_KEY = "AIzaSyCpLX-Ps4U9BxrKPL22bL_SAX1S30QF-Xg"
|
||||
|
||||
|
||||
def generate_gemini_training_file(data):
|
||||
training_temp_filename = "training_gemini.csv"
|
||||
|
||||
# create files that contain training data in jsonl format
|
||||
with open(training_temp_filename, 'w') as file:
|
||||
fieldnames = ['text_input', 'output']
|
||||
writer = csv.DictWriter(file, fieldnames=fieldnames)
|
||||
writer.writeheader()
|
||||
writer.writerows(data)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user