AI_Patent_Classification / customization.py
joaomorossini's picture
First commit for new HF Space. Adapted from https://huggingface.co/spaces/tseronni/startup_genome
f11dfb5
raw
history blame
No virus
1.28 kB
# js = """
# function createTitle() {
# var container = document.createElement('div');
# container.id = 'app-title';
# container.style.fontSize = '2em';
# container.style.fontWeight = 'bold';
# container.style.textAlign = 'center';
# container.style.marginBottom = '20px';
#
# var text = 'Automated Patent Classification with NLP';
#
# var gradioContainer = document.querySelector('.gradio-container');
# gradioContainer.insertBefore(container, gradioContainer.firstChild);
#
# return 'Title created';
# }
# """
js = """
function createGradioStaticText() {
var container = document.createElement('div');
container.id = 'gradio-animation'; // Keep the ID for consistent styling
container.style.fontSize = '2em';
container.style.textAlign = 'center';
container.style.marginBottom = '10px';
container.style.fontFamily = 'Roboto, sans-serif';
var text = 'Zero-Shot Patent Classifier';
container.innerText = text; // Set the text content directly
var gradioContainer = document.querySelector('.gradio-container');
gradioContainer.insertBefore(container, gradioContainer.firstChild);
}
"""
css = """
.all_results {
height: 90vh;
}
.reasoning_results {
overflow: scroll;
height: 85vh;
}
"""