File size: 1,236 Bytes
8eca2ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import gradio as gr


def read_md_file_to_string(file_path: str = "./markdown.md"):
    """
    Convert the markdown file to string

    Parameters:
        - file_path (str): The first number.
    
    Returns:
        - str: file content
    """
    file_content = ""
    try:
        with open(file_path, 'r', encoding='utf-8') as file:
            file_content = file.read()
    except Exception as e:
        print(f"An error occurred: {e}")
    return file_content


app_theme = gr.Theme.from_hub("ParityError/Interstellar")

tonai_creative_html = read_md_file_to_string(
    "stuffs/html/tonai_creative_info.html")
with open("stuffs/tips.md") as txtfile:
    tips_content = txtfile.read()


custom_css = """
/* General file uploader styling */
.file-uploader {
    height: 125px;
    overflow: hidden; /* Hide overflow if needed */
}

.file-uploader input[type="file"] {
    height: 100%;
    width: 100%;
    opacity: 0; /* Hide the default file input */
}

.file-uploader .custom-file-uploader {
    height: 100%;
    line-height: 125px; /* Adjust line height for centering text */
    display: flex;
    align-items: center;
    justify-content: center;
}

#stop-button {
    background-color: #f44336; /* blue color */
}
"""