Spaces:
Runtime error
Runtime error
Update src/text_processor.py
Browse files- src/text_processor.py +1 -7
src/text_processor.py
CHANGED
@@ -42,10 +42,4 @@ def process_description(description):
|
|
42 |
# Extract the generated JSON text from the response
|
43 |
json_text = response.choices[0].message.content
|
44 |
|
45 |
-
|
46 |
-
# Attempt to parse and validate the JSON response
|
47 |
-
analysis_result = VideoAnalysis.model_validate_json(json_text)
|
48 |
-
return analysis_result.model_dump_json() # Return as valid JSON
|
49 |
-
except Exception as e:
|
50 |
-
print(f"Error processing LLM output: {e}")
|
51 |
-
return {"error": "Could not process the video description."}
|
|
|
42 |
# Extract the generated JSON text from the response
|
43 |
json_text = response.choices[0].message.content
|
44 |
|
45 |
+
return json_text
|
|
|
|
|
|
|
|
|
|
|
|