This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Developed by: [More Information Needed]
Funded by [optional]: [More Information Needed]
Shared by [optional]: [More Information Needed]
Model type: [More Information Needed]
Language(s) (NLP): [More Information Needed]
License: [More Information Needed]
Finetuned from model [optional]: [More Information Needed]
Model Sources [optional]
Repository: [More Information Needed]
Paper [optional]: [More Information Needed]
Demo [optional]: [More Information Needed]
Uses
Direct Use
[More Information Needed]
Downstream Use [optional]
[More Information Needed]
Out-of-Scope Use
[More Information Needed]
Bias, Risks, and Limitations
[More Information Needed]
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
for file_path in data_files:
try:
print(f"Processing {file_path}")
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
if not isinstance(data, list):
data = [data]
dataset = Dataset.from_list(data)
datasets.append(dataset)
print(f"Successfully loaded {len(dataset)} examples from {file_path}")
except Exception as e:
print(f"Error processing {file_path}: {str(e)}")
continue
from tqdm import tqdm
import torch
import json
import re
タスクデータの読み込み
task_data = []
with open("./elyza-tasks-100-TV_0.jsonl", "r") as f:
item = ""
for line in f:
line = line.strip()
item += line
if item.endswith("}"):
task_data.append(json.loads(item))
item = ""
results = []
for i, data in enumerate(task_data):
results.append({
"task_id": data["task_id"],
"input": data["input"],
"output": outputs[i]
})
結果をjsonlファイルとして保存
jsonl_id = re.sub(".*/", "", new_model_id)
output_file = f"./{jsonl_id}-outputs.jsonl"
with open(output_file, 'w', encoding='utf-8') as f:
for result in results:
json.dump(result, f, ensure_ascii=False)
f.write('\n')
print(f"Results saved to {output_file}")