Delete pp_oficina_3_api
Browse files- pp_oficina_3_api/.gitattributes +0 -35
- pp_oficina_3_api/.gitignore +0 -1
- pp_oficina_3_api/README.md +0 -13
- pp_oficina_3_api/app.py +0 -38
- pp_oficina_3_api/fine_tunned_model/config.json +0 -26
- pp_oficina_3_api/fine_tunned_model/eval_results.txt +0 -4
- pp_oficina_3_api/fine_tunned_model/model.safetensors +0 -3
- pp_oficina_3_api/fine_tunned_model/model_args.json +0 -1
- pp_oficina_3_api/fine_tunned_model/optimizer.pt +0 -3
- pp_oficina_3_api/fine_tunned_model/scheduler.pt +0 -3
- pp_oficina_3_api/fine_tunned_model/special_tokens_map.json +0 -7
- pp_oficina_3_api/fine_tunned_model/tokenizer_config.json +0 -57
- pp_oficina_3_api/fine_tunned_model/training_args.bin +0 -3
- pp_oficina_3_api/fine_tunned_model/vocab.txt +0 -0
- pp_oficina_3_api/requirements.txt +0 -3
pp_oficina_3_api/.gitattributes
DELETED
|
@@ -1,35 +0,0 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
.idea/*
|
|
|
|
|
|
pp_oficina_3_api/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Pp Oficina 3
|
| 3 |
-
emoji: 🦀
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: pink
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 4.7.1
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
license: mit
|
| 11 |
-
---
|
| 12 |
-
|
| 13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/app.py
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
#from transformers import pipeline
|
| 3 |
-
from simpletransformers.question_answering import QuestionAnsweringModel
|
| 4 |
-
|
| 5 |
-
# create pipeline for QA
|
| 6 |
-
|
| 7 |
-
#qa = pipeline("question-answering")
|
| 8 |
-
model = QuestionAnsweringModel("bert", "./fine_tunned_model",use_cuda=False)
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
def answer_question(context, question):
|
| 12 |
-
predictions, raw_outputs = model.predict(
|
| 13 |
-
[
|
| 14 |
-
{
|
| 15 |
-
"context": context,
|
| 16 |
-
"qas": [
|
| 17 |
-
{
|
| 18 |
-
"question": question,
|
| 19 |
-
"id": "0",
|
| 20 |
-
}
|
| 21 |
-
],
|
| 22 |
-
}
|
| 23 |
-
]
|
| 24 |
-
)
|
| 25 |
-
|
| 26 |
-
return predictions[0]['answer'][0]
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
iface = gr.Interface(
|
| 30 |
-
fn=answer_question,
|
| 31 |
-
inputs=[
|
| 32 |
-
gr.Textbox(type="text", label="Context"),
|
| 33 |
-
gr.Textbox(type="text", label="Question")
|
| 34 |
-
],
|
| 35 |
-
outputs=gr.Textbox(type="text", label="Answer")
|
| 36 |
-
)
|
| 37 |
-
iface.launch()
|
| 38 |
-
#%%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/config.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "bert-base-cased",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"BertForQuestionAnswering"
|
| 5 |
-
],
|
| 6 |
-
"attention_probs_dropout_prob": 0.1,
|
| 7 |
-
"classifier_dropout": null,
|
| 8 |
-
"gradient_checkpointing": false,
|
| 9 |
-
"hidden_act": "gelu",
|
| 10 |
-
"hidden_dropout_prob": 0.1,
|
| 11 |
-
"hidden_size": 768,
|
| 12 |
-
"initializer_range": 0.02,
|
| 13 |
-
"intermediate_size": 3072,
|
| 14 |
-
"layer_norm_eps": 1e-12,
|
| 15 |
-
"max_position_embeddings": 512,
|
| 16 |
-
"model_type": "bert",
|
| 17 |
-
"num_attention_heads": 12,
|
| 18 |
-
"num_hidden_layers": 12,
|
| 19 |
-
"pad_token_id": 0,
|
| 20 |
-
"position_embedding_type": "absolute",
|
| 21 |
-
"torch_dtype": "float32",
|
| 22 |
-
"transformers_version": "4.35.2",
|
| 23 |
-
"type_vocab_size": 2,
|
| 24 |
-
"use_cache": true,
|
| 25 |
-
"vocab_size": 28996
|
| 26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/eval_results.txt
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
correct = 0
|
| 2 |
-
eval_loss = -1.3515625
|
| 3 |
-
incorrect = 1
|
| 4 |
-
similar = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/model.safetensors
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:bc164b5438dc0a2771505464cca2dddfa5b127f9c1aa3f7b6f62fcf83ced0ed3
|
| 3 |
-
size 430908208
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/model_args.json
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
{"adafactor_beta1": null, "adafactor_clip_threshold": 1.0, "adafactor_decay_rate": -0.8, "adafactor_eps": [1e-30, 0.001], "adafactor_relative_step": true, "adafactor_scale_parameter": true, "adafactor_warmup_init": true, "adam_betas": [0.9, 0.999], "adam_epsilon": 1e-08, "best_model_dir": "/content/drive/MyDrive/data_colab/fine_tunned_model/bert/best_model", "cache_dir": "cache_dir/", "config": {}, "cosine_schedule_num_cycles": 0.5, "custom_layer_parameters": [], "custom_parameter_groups": [], "dataloader_num_workers": 0, "do_lower_case": false, "dynamic_quantize": false, "early_stopping_consider_epochs": false, "early_stopping_delta": 0, "early_stopping_metric": "correct", "early_stopping_metric_minimize": false, "early_stopping_patience": 3, "encoding": null, "eval_batch_size": 16, "evaluate_during_training": true, "evaluate_during_training_silent": true, "evaluate_during_training_steps": 1000, "evaluate_during_training_verbose": false, "evaluate_each_epoch": true, "fp16": true, "gradient_accumulation_steps": 1, "learning_rate": 4e-05, "local_rank": -1, "logging_steps": 50, "loss_type": null, "loss_args": {}, "manual_seed": null, "max_grad_norm": 1.0, "max_seq_length": 128, "model_name": "bert-base-cased", "model_type": "bert", "multiprocessing_chunksize": -1, "n_gpu": 1, "no_cache": false, "no_save": false, "not_saved_args": [], "num_train_epochs": 30, "optimizer": "AdamW", "output_dir": "outputs/bert", "overwrite_output_dir": true, "polynomial_decay_schedule_lr_end": 1e-07, "polynomial_decay_schedule_power": 1.0, "process_count": 1, "quantized_model": false, "reprocess_input_data": true, "save_best_model": true, "save_eval_checkpoints": false, "save_model_every_epoch": false, "save_optimizer_and_scheduler": true, "save_steps": 2000, "scheduler": "linear_schedule_with_warmup", "silent": false, "skip_special_tokens": true, "tensorboard_dir": null, "thread_count": null, "tokenizer_name": null, "tokenizer_type": null, "train_batch_size": 16, "train_custom_parameters_only": false, "use_cached_eval_features": true, "use_early_stopping": false, "use_hf_datasets": false, "use_multiprocessing": true, "use_multiprocessing_for_evaluation": true, "wandb_kwargs": {}, "wandb_project": null, "warmup_ratio": 0.06, "warmup_steps": 2, "weight_decay": 0.0, "model_class": "QuestionAnsweringModel", "doc_stride": 384, "lazy_loading": false, "max_answer_length": 100, "max_query_length": 64, "n_best_size": 8, "null_score_diff_threshold": 0.0, "special_tokens_list": []}
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/optimizer.pt
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:17692f3e6bffe74cbf8609f43d13a973a34387dbda7554574f6d71d1fc54f8e1
|
| 3 |
-
size 861936186
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/scheduler.pt
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:2742749f8249f653b9e661fc0b8404dbffd1e73a53d2780a01142ee4dd037161
|
| 3 |
-
size 1064
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/special_tokens_map.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"cls_token": "[CLS]",
|
| 3 |
-
"mask_token": "[MASK]",
|
| 4 |
-
"pad_token": "[PAD]",
|
| 5 |
-
"sep_token": "[SEP]",
|
| 6 |
-
"unk_token": "[UNK]"
|
| 7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/tokenizer_config.json
DELETED
|
@@ -1,57 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"added_tokens_decoder": {
|
| 3 |
-
"0": {
|
| 4 |
-
"content": "[PAD]",
|
| 5 |
-
"lstrip": false,
|
| 6 |
-
"normalized": false,
|
| 7 |
-
"rstrip": false,
|
| 8 |
-
"single_word": false,
|
| 9 |
-
"special": true
|
| 10 |
-
},
|
| 11 |
-
"100": {
|
| 12 |
-
"content": "[UNK]",
|
| 13 |
-
"lstrip": false,
|
| 14 |
-
"normalized": false,
|
| 15 |
-
"rstrip": false,
|
| 16 |
-
"single_word": false,
|
| 17 |
-
"special": true
|
| 18 |
-
},
|
| 19 |
-
"101": {
|
| 20 |
-
"content": "[CLS]",
|
| 21 |
-
"lstrip": false,
|
| 22 |
-
"normalized": false,
|
| 23 |
-
"rstrip": false,
|
| 24 |
-
"single_word": false,
|
| 25 |
-
"special": true
|
| 26 |
-
},
|
| 27 |
-
"102": {
|
| 28 |
-
"content": "[SEP]",
|
| 29 |
-
"lstrip": false,
|
| 30 |
-
"normalized": false,
|
| 31 |
-
"rstrip": false,
|
| 32 |
-
"single_word": false,
|
| 33 |
-
"special": true
|
| 34 |
-
},
|
| 35 |
-
"103": {
|
| 36 |
-
"content": "[MASK]",
|
| 37 |
-
"lstrip": false,
|
| 38 |
-
"normalized": false,
|
| 39 |
-
"rstrip": false,
|
| 40 |
-
"single_word": false,
|
| 41 |
-
"special": true
|
| 42 |
-
}
|
| 43 |
-
},
|
| 44 |
-
"clean_up_tokenization_spaces": true,
|
| 45 |
-
"cls_token": "[CLS]",
|
| 46 |
-
"do_basic_tokenize": true,
|
| 47 |
-
"do_lower_case": false,
|
| 48 |
-
"mask_token": "[MASK]",
|
| 49 |
-
"model_max_length": 512,
|
| 50 |
-
"never_split": null,
|
| 51 |
-
"pad_token": "[PAD]",
|
| 52 |
-
"sep_token": "[SEP]",
|
| 53 |
-
"strip_accents": null,
|
| 54 |
-
"tokenize_chinese_chars": true,
|
| 55 |
-
"tokenizer_class": "BertTokenizer",
|
| 56 |
-
"unk_token": "[UNK]"
|
| 57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/training_args.bin
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6c908a401f27e2799b83584eb26989b87a41f1855a55f42d7e4c7724c0c9f362
|
| 3 |
-
size 3512
|
|
|
|
|
|
|
|
|
|
|
|
pp_oficina_3_api/fine_tunned_model/vocab.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pp_oficina_3_api/requirements.txt
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
gradio==3.39.0
|
| 2 |
-
simpletransformers
|
| 3 |
-
torch
|
|
|
|
|
|
|
|
|
|
|
|