Spaces:
Runtime error
Runtime error
from flask import Flask, request | |
from datasets import load_dataset | |
import os | |
token = os.getenv('hugging_token') | |
app = Flask(__name__) | |
def main(): | |
try: | |
# Carregando um dataset local | |
dataset = load_dataset("Herick1/datasetTest", data_files="Herick1/datasetTest/t.txt", use_auth_token=token) | |
if request.method == "GET": | |
return {"message":"Sem Dados..."} | |
else: | |
data_post = request.get_json() | |
except Exception as err: | |
return str(err) |