"""
Loading animations for Gradio chatbot interface.
Contains functions to generate animated thinking indicators with just pulsing dots.
"""
def create_thinking_indicator():
"""
Creates an HTML thinking indicator with just animated dots.
Returns:
str: HTML string with animated dots only
"""
return '''
'''
def create_custom_dot_indicator(dot_count=3):
"""
Creates a thinking indicator with specified number of dots.
Args:
dot_count (int): Number of animated dots (default: 3)
Returns:
str: HTML string with custom number of dots
"""
dots = ''.join(['' for _ in range(dot_count)])
return f''''''
# Main function to use in the chatbot
def get_thinking_dots():
"""
Returns the standard thinking dots indicator.
Returns:
str: HTML string with animated thinking dots
"""
return create_thinking_indicator()
# Quick usage example:
if __name__ == "__main__":
print("Thinking dots indicator:")
print(get_thinking_dots())