gokilashree commited on
Commit
fa2f8ba
·
verified ·
1 Parent(s): ae23d7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -53,7 +53,7 @@ def generate_short_paragraph_from_text(translated_text):
53
  try:
54
  print(f"Generating a short paragraph from translated text: {translated_text}")
55
  # Generate a shorter paragraph from the translated text using smaller settings
56
- paragraph = text_generator(translated_text, max_length=100, num_return_sequences=1, temperature=0.7, top_p=0.8)[0]['generated_text']
57
  print(f"Paragraph generation completed: {paragraph}")
58
  return paragraph
59
  except Exception as e:
@@ -96,5 +96,5 @@ iface = gr.Interface(
96
  description="Translate Tamil text to English using Facebook's mbart-large-50 model, generate a short paragraph, and create an image using the translated text.",
97
  )
98
 
99
- # Launch Gradio app without `share=True`
100
  iface.launch()
 
53
  try:
54
  print(f"Generating a short paragraph from translated text: {translated_text}")
55
  # Generate a shorter paragraph from the translated text using smaller settings
56
+ paragraph = text_generator(translated_text, max_length=150, num_return_sequences=1, temperature=0.2, top_p=0.8)[0]['generated_text']
57
  print(f"Paragraph generation completed: {paragraph}")
58
  return paragraph
59
  except Exception as e:
 
96
  description="Translate Tamil text to English using Facebook's mbart-large-50 model, generate a short paragraph, and create an image using the translated text.",
97
  )
98
 
99
+
100
  iface.launch()