Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -106,6 +106,17 @@ class GenerateResponse(BaseModel):
|
|
106 |
reasoning_content: str
|
107 |
generated_text: str
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
# --- Utility Functions ---
|
110 |
|
111 |
def clean_text(text: str) -> str:
|
|
|
106 |
reasoning_content: str
|
107 |
generated_text: str
|
108 |
|
109 |
+
# New model for summarization request
|
110 |
+
class SummarizeRequest(BaseModel):
|
111 |
+
replies: List[str]
|
112 |
+
task: str # expecting "summarisation"
|
113 |
+
|
114 |
+
# New model for summarization response
|
115 |
+
class SummarizeResponse(BaseModel):
|
116 |
+
individual_summaries: Dict[int, Dict[str, str]] # {index: {"reasoning": str, "summary": str}}
|
117 |
+
combined_reasoning: str
|
118 |
+
combined_summary: str
|
119 |
+
|
120 |
# --- Utility Functions ---
|
121 |
|
122 |
def clean_text(text: str) -> str:
|