Frenchizer commited on
Commit
dcd32ae
·
verified ·
1 Parent(s): b67c5e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -116,11 +116,16 @@ def process_request(input_text):
116
  # Return the translations and contexts
117
  return translations, context_results
118
 
119
- # Gradio interface
120
  def gradio_interface(input_text):
121
- translation, contexts = process_request(input_text)
122
- # Format the output
123
- output = f"{translation}\n"
 
 
 
 
 
 
124
  return output.strip()
125
 
126
  # Create the Gradio interface
 
116
  # Return the translations and contexts
117
  return translations, context_results
118
 
 
119
  def gradio_interface(input_text):
120
+ # Call process_request to get translations and context_results
121
+ translations, contexts = process_request(input_text)
122
+
123
+ # Extract only the translation values from the dictionary
124
+ translation_values = list(translations.values())
125
+
126
+ # Join the translations into a single string with line breaks
127
+ output = "\n".join(translation_values)
128
+
129
  return output.strip()
130
 
131
  # Create the Gradio interface