Update app.py
Browse files
app.py
CHANGED
|
@@ -88,7 +88,8 @@ def translate_text(text, language):
|
|
| 88 |
def process_text(input_text, model, language):
|
| 89 |
start_time = time.time()
|
| 90 |
print(f"Input text: {input_text[:500]}...") # Show only the first 500 characters for brevity
|
| 91 |
-
|
|
|
|
| 92 |
if not summary:
|
| 93 |
print("Summarization failed. Please provide longer text or try a different model.")
|
| 94 |
return "", ""
|
|
@@ -154,5 +155,6 @@ iface.launch()
|
|
| 154 |
|
| 155 |
|
| 156 |
|
|
|
|
| 157 |
|
| 158 |
|
|
|
|
| 88 |
def process_text(input_text, model, language):
|
| 89 |
start_time = time.time()
|
| 90 |
print(f"Input text: {input_text[:500]}...") # Show only the first 500 characters for brevity
|
| 91 |
+
model_name = summarization_models[model]
|
| 92 |
+
summary = summarize_text(input_text, model_name)
|
| 93 |
if not summary:
|
| 94 |
print("Summarization failed. Please provide longer text or try a different model.")
|
| 95 |
return "", ""
|
|
|
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
+
|
| 159 |
|
| 160 |
|