File size: 2,003 Bytes
c405f6b
c311b1c
 
c405f6b
 
8dbb9e3
9d0738a
8dbb9e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4f96c13
8dbb9e3
 
4f96c13
 
8dbb9e3
4f96c13
3bc1886
f01f614
4f96c13
ecb8b5f
 
8dbb9e3
 
 
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

import os
os.system("pip install--upgrade pip")
import argparse
check="Hera"
import gradio as gr
from MeAI_Maincode import Chatbot,BrainTumor,Detectskindisease,Pneumonia
js = """
function createGradioAnimation() {
    var container = document.createElement('div');
    container.id = 'gradio-animation';
    container.style.fontSize = '2em';
    container.style.fontWeight = 'bold';
    container.style.textAlign = 'center';
    container.style.marginBottom = '20px';

    var text = 'Welcome to Hera!';
    for (var i = 0; i < text.length; i++) {
        (function(i){
            setTimeout(function(){
                var letter = document.createElement('span');
                letter.style.opacity = '0';
                letter.style.transition = 'opacity 0.5s';
                letter.innerText = text[i];

                container.appendChild(letter);

                setTimeout(function() {
                    letter.style.opacity = '1';
                }, 50);
            }, i * 250);
        })(i);
    }

    var gradioContainer = document.querySelector('.gradio-container');
    gradioContainer.insertBefore(container, gradioContainer.firstChild);

    return 'Animation created';
}
"""
css = """
.textboxskin {
    font-size: 50px; !important;
}
"""
if __name__ == "__main__":

  chatkey = "f914daada5mshde035a916247607p148638jsn0abe47d56130"
  skinkey = "e287554254msh87d1bb377bc1408p1cebaejsn5d4db25922af"  

  Main = gr.TabbedInterface([BrainTumor.create_brain_tumor_detect(), Pneumonia.create_pneumonia_tab(), Detectskindisease.create_skin_tab(skinkey), Polyb.create_polyb(), ChatBot.create_Chatbot_tab(chatkey)],
                            tab_names = ["Chẩn Đoán Khối U Não", "Chẩn Đoán Tình Trạng Phổi", "Chẩn Đoán Bệnh Ngoài Da","Phát hiện khối u đại tràng", "Tư Vấn Sức Khỏe Thông Minh"],
                            theme = "HaleyCH/HaleyCH_Theme",
                            js = js,css=css)
  Main.launch( share=True, debug = True)