Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
5 |
|
6 |
def translate_text(input_text, target_language):
|
7 |
prompt = f"Translate the following text into {target_language}: {input_text}"
|
8 |
-
response = client.text_generation(prompt
|
9 |
|
10 |
# Since the model's response includes the prompt, we extract only the translated text
|
11 |
# Assuming the translated text follows immediately after the prompt
|
|
|
5 |
|
6 |
def translate_text(input_text, target_language):
|
7 |
prompt = f"Translate the following text into {target_language}: {input_text}"
|
8 |
+
response = client.text_generation(prompt)
|
9 |
|
10 |
# Since the model's response includes the prompt, we extract only the translated text
|
11 |
# Assuming the translated text follows immediately after the prompt
|