MitchellKil commited on
Commit
bc4fbe3
·
verified ·
1 Parent(s): a801e20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 actually run and return text to project
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: # gets current feedback file
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",