Spaces:
Running
Running
Update apis/chat_api.py
Browse files- apis/chat_api.py +2 -2
apis/chat_api.py
CHANGED
@@ -68,13 +68,13 @@ class ChatAPIApp:
|
|
68 |
return JSONResponse(content=json_compatible_item_data)
|
69 |
|
70 |
|
71 |
-
class DetectLanguagePostItem(BaseModel)
|
72 |
input_text: str = Field(
|
73 |
default="Hello",
|
74 |
description="(str) `Text for translate`",
|
75 |
)
|
76 |
|
77 |
-
def detect_language(self, item: DetectLanguagePostItem)
|
78 |
translator = Translator()
|
79 |
detected = translator.detect(item.input_text)
|
80 |
|
|
|
68 |
return JSONResponse(content=json_compatible_item_data)
|
69 |
|
70 |
|
71 |
+
class DetectLanguagePostItem(BaseModel):
|
72 |
input_text: str = Field(
|
73 |
default="Hello",
|
74 |
description="(str) `Text for translate`",
|
75 |
)
|
76 |
|
77 |
+
def detect_language(self, item: DetectLanguagePostItem):
|
78 |
translator = Translator()
|
79 |
detected = translator.detect(item.input_text)
|
80 |
|