Update main.py
Browse files
main.py
CHANGED
@@ -33,7 +33,7 @@ async def generate_text(request: RequestBody):
|
|
33 |
first_inst_index = output1.find("[/INST]")
|
34 |
second_inst_index = output1.find("[/IN", first_inst_index + len("[/INST]") + 1)
|
35 |
predicted_selfies = output1[first_inst_index + len("[/INST]"):second_inst_index].strip()
|
36 |
-
result[f'predict_{i+1}'] = predicted_selfies
|
37 |
|
38 |
return result
|
39 |
except Exception as e:
|
|
|
33 |
first_inst_index = output1.find("[/INST]")
|
34 |
second_inst_index = output1.find("[/IN", first_inst_index + len("[/INST]") + 1)
|
35 |
predicted_selfies = output1[first_inst_index + len("[/INST]"):second_inst_index].strip()
|
36 |
+
result[f'predict_{i+1}'] = sf.decoder(predicted_selfies)
|
37 |
|
38 |
return result
|
39 |
except Exception as e:
|