Lenylvt commited on
Commit
3917c39
·
verified ·
1 Parent(s): 21fca8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, parameters={"max_new_tokens": 256}, options={"wait_for_model": True})
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, options={"wait_for_model": True})
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