Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,10 +35,11 @@ def run_inference(model_name, prompt_text):
|
|
| 35 |
config_content = file.read()
|
| 36 |
config_content = config_content.replace('prompt_path = "./assets/texts/t2v_samples.txt"', f'prompt_path = "{prompt_file.name}"')
|
| 37 |
|
| 38 |
-
with tempfile.NamedTemporaryFile('w', delete=False) as temp_file:
|
| 39 |
temp_file.write(config_content)
|
| 40 |
temp_config_path = temp_file.name
|
| 41 |
|
|
|
|
| 42 |
cmd = [
|
| 43 |
"torchrun", "--standalone", "--nproc_per_node", "1",
|
| 44 |
"scripts/inference.py", temp_config_path,
|
|
|
|
| 35 |
config_content = file.read()
|
| 36 |
config_content = config_content.replace('prompt_path = "./assets/texts/t2v_samples.txt"', f'prompt_path = "{prompt_file.name}"')
|
| 37 |
|
| 38 |
+
with tempfile.NamedTemporaryFile('w', delete=False, suffix='.py') as temp_file:
|
| 39 |
temp_file.write(config_content)
|
| 40 |
temp_config_path = temp_file.name
|
| 41 |
|
| 42 |
+
|
| 43 |
cmd = [
|
| 44 |
"torchrun", "--standalone", "--nproc_per_node", "1",
|
| 45 |
"scripts/inference.py", temp_config_path,
|