DeMaking commited on
Commit
e0808d3
·
verified ·
1 Parent(s): b61b7f7

Rename app.py to 2files_app.py

Browse files
Files changed (1) hide show
  1. app.py → 2files_app.py +2 -2
app.py → 2files_app.py RENAMED
@@ -76,7 +76,7 @@ def generate_response(text):
76
  if language == "hebrew":
77
  #hebrew_generator = pipeline("text-generation", model="onlplab/alephbert-base")
78
  # output = hebrew_generator(text, max_length=100, truncation=True)
79
- output = lang_generator(text, max_new_tokens=128, truncation=True)
80
  print(f"Hebrew model output: {output}, ", f"current time: {current_time_gmt()}") # Debugging
81
  return output[0]["generated_text"]
82
 
@@ -84,7 +84,7 @@ def generate_response(text):
84
  #english_generator = pipeline("text-generation", model="mistralai/Mistral-Nemo-Instruct-2407", max_new_tokens=128)
85
  # english_generator = pipeline("text-generation", model="distilgpt2")
86
  #output = english_generator(text, max_length=50, truncation=True)
87
- output = lang_generator(text, max_new_tokens=128, truncation=True)
88
  print(f"English model output: {output}, ", f"current time: {current_time_gmt()}") # Debugging
89
  return output[0]["generated_text"]
90
 
 
76
  if language == "hebrew":
77
  #hebrew_generator = pipeline("text-generation", model="onlplab/alephbert-base")
78
  # output = hebrew_generator(text, max_length=100, truncation=True)
79
+ output = lang_generator(text, max_new_tokens=250, truncation=True)
80
  print(f"Hebrew model output: {output}, ", f"current time: {current_time_gmt()}") # Debugging
81
  return output[0]["generated_text"]
82
 
 
84
  #english_generator = pipeline("text-generation", model="mistralai/Mistral-Nemo-Instruct-2407", max_new_tokens=128)
85
  # english_generator = pipeline("text-generation", model="distilgpt2")
86
  #output = english_generator(text, max_length=50, truncation=True)
87
+ output = lang_generator(text, max_new_tokens=250, truncation=True)
88
  print(f"English model output: {output}, ", f"current time: {current_time_gmt()}") # Debugging
89
  return output[0]["generated_text"]
90