File size: 553 Bytes
71fbc82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#\!/usr/bin/env python
"""
Simple script to fix the gr.Group error in app.py
"""

import os
import re

# Path to the app.py file
app_path = "/home/user/app/app.py" 

# Read the file
with open(app_path, "r") as f:
    content = f.read()

# Fix the gr.Group initialization
fixed_content = re.sub(
    r'gr\.Group\("([^"]+)"\)',
    r'gr.Group(label="\1")',
    content
)

# Write the fixed content back
with open(app_path, "w") as f:
    f.write(fixed_content)

print("Fixed the gr.Group initialization in app.py")
print("You can now run: python app.py")