Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ def gaelicToIPA(text: str) -> str:
|
|
| 52 |
decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 53 |
return decoded.strip()
|
| 54 |
|
| 55 |
-
@app.post("/predict") # call to
|
| 56 |
def predict(request: gaelicText):
|
| 57 |
ipa = gaelicToIPA(request.text)
|
| 58 |
return {"ipa": ipa}
|
|
@@ -75,7 +75,7 @@ def save_feedback(data: Feedback):
|
|
| 75 |
"phonetic": data.phonetic,
|
| 76 |
"feedback": data.feedback
|
| 77 |
}
|
| 78 |
-
try: #
|
| 79 |
local_file = hf_hub_download(
|
| 80 |
repo_id=dataset,
|
| 81 |
filename="feedback.jsonl",
|
|
|
|
| 52 |
decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 53 |
return decoded.strip()
|
| 54 |
|
| 55 |
+
@app.post("/predict") # call to return text to project
|
| 56 |
def predict(request: gaelicText):
|
| 57 |
ipa = gaelicToIPA(request.text)
|
| 58 |
return {"ipa": ipa}
|
|
|
|
| 75 |
"phonetic": data.phonetic,
|
| 76 |
"feedback": data.feedback
|
| 77 |
}
|
| 78 |
+
try: # current feedback file
|
| 79 |
local_file = hf_hub_download(
|
| 80 |
repo_id=dataset,
|
| 81 |
filename="feedback.jsonl",
|