Redmind commited on
Commit
b005055
·
verified ·
1 Parent(s): 1cc4979

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,15 +2,15 @@ import openai
2
  import gradio as gr
3
 
4
  # Set your OpenAI API key
5
- openai.api_key = "your_openai_api_key"
6
 
7
- def translate_dutch_to_hindi(dutch_text, model="gpt-4-mini"):
8
  """
9
  Translates Dutch text to both conversational and formal Hindi using OpenAI.
10
 
11
  Args:
12
  - dutch_text (str): The text in Dutch to be translated.
13
- - model (str): The model to use for translation (e.g., gpt-3.5-turbo, gpt-4-mini).
14
 
15
  Returns:
16
  - tuple: (Conversational Hindi Translation, Formal Hindi Translation)
 
2
  import gradio as gr
3
 
4
  # Set your OpenAI API key
5
+ openai.api_key = os.getenv("OPENAI_API_KEY")
6
 
7
+ def translate_dutch_to_hindi(dutch_text, model="gpt-4o-mini"):
8
  """
9
  Translates Dutch text to both conversational and formal Hindi using OpenAI.
10
 
11
  Args:
12
  - dutch_text (str): The text in Dutch to be translated.
13
+ - model (str): The model to use for translation (e.g., gpt-3.5-turbo, gpt-4o-mini).
14
 
15
  Returns:
16
  - tuple: (Conversational Hindi Translation, Formal Hindi Translation)