File size: 6,566 Bytes
90a6801
 
 
 
 
1c00493
37a996a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1c00493
 
1ed3bf7
37a996a
 
 
 
90a6801
37a996a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90a6801
 
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!doctype html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width" />
		<title>MG Space</title>
  <style>
    #ga1 div#component-28 {
    display: none;
}
#ga1 div#component-29 {
    display: none;
}
#ga1 div#component-1 {
    display: none;
}
#ga1 textarea.scroll-hide.svelte-1kcgrqr {
    height: 200px !important;
}
#ga1 button#component-12 {
    color: white;
    background: #e253dd;
}
#ga1 div#component-6{
  min-width: 100px !important;
}
  </style>
    
    </head>
	<body>
		<script
	type="module"
	src="https://gradio.s3-us-west-2.amazonaws.com/3.38.0/gradio.js"
></script>

<gradio-app id="ga1" src="https://jbilcke-hf-musicgen.hf.space"></gradio-app>
<script>
const targetNode12 = document.body; // или другой родительский элемент
const config12 = { childList: true, subtree: true };
const callback12 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp12 = document.getElementById('ga1');
            const targetDiv12 = grApp12.querySelector('#component-5');
            const targetSpan12 = targetDiv12.querySelector('textarea[data-testid="textbox"]');
            targetSpan12.placeholder = "Например, calm jazz melody";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer12 = new MutationObserver(callback12);
observer12.observe(targetNode12, config12);
</script>

<script>
const targetNode11 = document.body; // или другой родительский элемент
const config11 = { childList: true, subtree: true };
const callback11 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp11 = document.getElementById('ga1');
            const targetDiv11 = grApp11.querySelector('#component-27');
            const targetSpan11 = targetDiv11.querySelector('div[data-testid="block-label"]');
            targetSpan11.textContent = "Сгенерированная музыка:";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer11 = new MutationObserver(callback11);
observer11.observe(targetNode11, config11);
</script>

<script>
const targetNode10 = document.body; // или другой родительский элемент
const config10 = { childList: true, subtree: true };
const callback10 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp10 = document.getElementById('ga1');
            const targetDiv10 = grApp10.querySelector('#component-18');
            const targetSpan10 = targetDiv10.querySelector('span[data-testid="block-info"]');
            targetSpan10.textContent = "Длительность в секундах:";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer10 = new MutationObserver(callback10);
observer10.observe(targetNode10, config10);
</script>

<script>
const targetNode9 = document.body; // или другой родительский элемент
const config9 = { childList: true, subtree: true };
const callback9 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp9 = document.getElementById('ga1');
            const targetDiv9 = grApp9.querySelector('#component-14');
            const targetSpan9 = targetDiv9.querySelector('span[data-testid="block-info"]');
            targetSpan9.textContent = "Модель нейросети:";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer9 = new MutationObserver(callback9);
observer9.observe(targetNode9, config9);
</script>

<script>
const targetNode8 = document.body; // или другой родительский элемент
const config8 = { childList: true, subtree: true };
const callback8 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp8 = document.getElementById('ga1');
            const targetDiv8 = grApp8.querySelector('#component-13');
            targetDiv8.textContent = "Прервать";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer8 = new MutationObserver(callback8);
observer8.observe(targetNode8, config8);
</script>

<script>
const targetNode7 = document.body; // или другой родительский элемент
const config7 = { childList: true, subtree: true };
const callback7 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp7 = document.getElementById('ga1');
            const targetDiv7 = grApp7.querySelector('#component-7');
            const targetSpan7 = targetDiv7.querySelector('span[data-testid="block-info"]');
            targetSpan7.textContent = "Опционально: аудио-референс (из файла или микрофона)";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer7 = new MutationObserver(callback7);
observer7.observe(targetNode7, config7);
</script>

<script>
const targetNode6 = document.body; // или другой родительский элемент
const config6 = { childList: true, subtree: true };
const callback6 = function(mutationsList, observer) {
    for(let mutation of mutationsList) {
        if (mutation.type === 'childList') {
            const grApp6 = document.getElementById('ga1');
            const targetDiv6 = grApp6.querySelector('#component-5');
            const targetSpan6 = targetDiv6.querySelector('span[data-testid="block-info"]');
            targetSpan6.textContent = "Описание музыки:";
            observer.disconnect(); // Останавливаем наблюдение после изменения
        }
    }
};
const observer6 = new MutationObserver(callback6);
observer6.observe(targetNode6, config6);
</script>
	</body>
</html>