Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -354,7 +354,7 @@ Speaker 2: ...
|
|
354 |
#inputs = {k: v.to(self.model.device) for k, v in inputs.items()}
|
355 |
add_log(f"✅ Inputs moved to device: {self.model.device}")
|
356 |
|
357 |
-
add_log("🧠 Generating with model...")
|
358 |
|
359 |
# Generate with timeout and better parameters
|
360 |
with torch.no_grad():
|
@@ -385,7 +385,7 @@ Speaker 2: ...
|
|
385 |
|
386 |
# Extract and validate JSON
|
387 |
#result = self.clean_and_validate_json(generated_text)
|
388 |
-
result = conversation_to_json(generated_text)
|
389 |
|
390 |
if progress:
|
391 |
progress(0.5, "✅ Script generated successfully!")
|
|
|
354 |
#inputs = {k: v.to(self.model.device) for k, v in inputs.items()}
|
355 |
add_log(f"✅ Inputs moved to device: {self.model.device}")
|
356 |
|
357 |
+
add_log("self🧠 Generating with model...")
|
358 |
|
359 |
# Generate with timeout and better parameters
|
360 |
with torch.no_grad():
|
|
|
385 |
|
386 |
# Extract and validate JSON
|
387 |
#result = self.clean_and_validate_json(generated_text)
|
388 |
+
result = self.conversation_to_json(generated_text)
|
389 |
|
390 |
if progress:
|
391 |
progress(0.5, "✅ Script generated successfully!")
|