Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def analyze_video(video_file):
|
|
79 |
results = analyzer.analyze_media(truncated_video)
|
80 |
|
81 |
# Get the combined probability and interpret the result
|
82 |
-
combined_probability = results.get('combined_assessment', 0)
|
83 |
analysis_result = "genuine/original" if combined_probability < 50 else "a deepfake"
|
84 |
|
85 |
# Prepare JSON output
|
@@ -96,6 +96,7 @@ def analyze_video(video_file):
|
|
96 |
logging.error(f"Error during analysis: {e}")
|
97 |
return {"error": "An error occurred during video analysis. Please check your input and try again."}
|
98 |
|
|
|
99 |
# Define the Gradio interface with json output to handle dictionaries
|
100 |
interface = gr.Interface(
|
101 |
fn=analyze_video,
|
|
|
79 |
results = analyzer.analyze_media(truncated_video)
|
80 |
|
81 |
# Get the combined probability and interpret the result
|
82 |
+
combined_probability = float(results.get('combined_assessment', 0))
|
83 |
analysis_result = "genuine/original" if combined_probability < 50 else "a deepfake"
|
84 |
|
85 |
# Prepare JSON output
|
|
|
96 |
logging.error(f"Error during analysis: {e}")
|
97 |
return {"error": "An error occurred during video analysis. Please check your input and try again."}
|
98 |
|
99 |
+
|
100 |
# Define the Gradio interface with json output to handle dictionaries
|
101 |
interface = gr.Interface(
|
102 |
fn=analyze_video,
|