Jforeverss commited on
Commit
f3c083b
·
verified ·
1 Parent(s): 91fbcd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,7 +60,7 @@ def preprocess_pdf(pdf_path, tokenizer):
60
 
61
  def translate_text(text, target_language):
62
  response = openai.ChatCompletion.create(
63
- model="gpt-4",
64
  messages=[
65
  {"role": "system", "content": "You are a helpful assistant that translates English text to other languages."},
66
  {"role": "user", "content": f'Translate the following English text to {target_language}: "{text}"'},
@@ -70,7 +70,7 @@ def translate_text(text, target_language):
70
 
71
  def explain_term(term):
72
  response = openai.ChatCompletion.create(
73
- model="gpt-4.5-turbo",
74
  messages=[
75
  {
76
  "role": "system",
@@ -143,7 +143,7 @@ if uploaded_file is not None:
143
  chat_history = "\n".join([sentence[0] for sentence in top_5_sentences])
144
 
145
  response = openai.ChatCompletion.create(
146
- model="gpt-4.5-turbo",
147
  messages=[
148
  {"role": "system", "content": "You are a helpful generator which read the short paragraphs and answer the question."},
149
  {"role": "user", "content": chat_history},
 
60
 
61
  def translate_text(text, target_language):
62
  response = openai.ChatCompletion.create(
63
+ model="gpt-4-1106-preview",
64
  messages=[
65
  {"role": "system", "content": "You are a helpful assistant that translates English text to other languages."},
66
  {"role": "user", "content": f'Translate the following English text to {target_language}: "{text}"'},
 
70
 
71
  def explain_term(term):
72
  response = openai.ChatCompletion.create(
73
+ model="gpt-4-1106-preview",
74
  messages=[
75
  {
76
  "role": "system",
 
143
  chat_history = "\n".join([sentence[0] for sentence in top_5_sentences])
144
 
145
  response = openai.ChatCompletion.create(
146
+ model="gpt-4-1106-preview",
147
  messages=[
148
  {"role": "system", "content": "You are a helpful generator which read the short paragraphs and answer the question."},
149
  {"role": "user", "content": chat_history},