Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ async def summarize_text(file: UploadFile = File(None), text: str = Form(None)):
|
|
| 48 |
if file:
|
| 49 |
text = await extract_text_from_file(file)
|
| 50 |
elif not text:
|
| 51 |
-
raise HTTPException(status_code=400, detail="No text or
|
| 52 |
|
| 53 |
summary = text_pipeline(f"summarize: {text}", max_length=100)
|
| 54 |
return {"summary": summary[0]['generated_text']}
|
|
|
|
| 48 |
if file:
|
| 49 |
text = await extract_text_from_file(file)
|
| 50 |
elif not text:
|
| 51 |
+
raise HTTPException(status_code=400, detail="No text or files provided")
|
| 52 |
|
| 53 |
summary = text_pipeline(f"summarize: {text}", max_length=100)
|
| 54 |
return {"summary": summary[0]['generated_text']}
|