Nonnormalizable commited on
Commit
8bae64a
·
1 Parent(s): b3f06b6
Files changed (1) hide show
  1. tasks/text.py +2 -2
tasks/text.py CHANGED
@@ -1,4 +1,4 @@
1
- from fastapi import APIRouter
2
  from datetime import datetime
3
  from datasets import load_dataset
4
  from sklearn.metrics import accuracy_score
@@ -73,7 +73,7 @@ def bert_model(test_dataset: dict, model_type: str):
73
  @router.post(ROUTE, tags=["Text Task"])
74
  async def evaluate_text(
75
  request: TextEvaluationRequest,
76
- model_type="bert-base",
77
  ):
78
  """
79
  Evaluate text classification for climate disinformation detection.
 
1
+ from fastapi import APIRouter, Query
2
  from datetime import datetime
3
  from datasets import load_dataset
4
  from sklearn.metrics import accuracy_score
 
73
  @router.post(ROUTE, tags=["Text Task"])
74
  async def evaluate_text(
75
  request: TextEvaluationRequest,
76
+ model_type: str = "bert-base",
77
  ):
78
  """
79
  Evaluate text classification for climate disinformation detection.