dreyyyy commited on
Commit
28c8d02
·
verified ·
1 Parent(s): 71fd9f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,7 +2,8 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load your Hugging Face model
5
- translator = pipeline("translation_en_to_fr", model="dreyyyy/EN-FR")
 
6
 
7
  # Define the translation function
8
  def translate_text(input_text):
 
2
  from transformers import pipeline
3
 
4
  # Load your Hugging Face model
5
+ translator = pipeline("translation_en_to_fr", model="dreyyyy/EN-FR", device=-1) # Use CPU explicitly
6
+
7
 
8
  # Define the translation function
9
  def translate_text(input_text):