anasraza526's picture
Clean deploy to Hugging Face
ac90985
#!/usr/bin/env python3
import asyncio
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from app.services.ai_engine import AIEngine
async def test_ai_responses():
ai = AIEngine()
# Sample Shaqaf content
sample_content = [
"Al Shaqaf Medical Requisites Trading L.L.C is a global team focused on advancing healthcare with innovative ECM technologies, combining science and collaboration to create new possibilities in tissue regeneration.",
"We are developing organ-based ECM scaffolds that open up new possibilities in tissue repair and regeneration. Our products include Liver ECM Hydrogel, Kidney ECM Hydrogel, and Pancreas ECM Hydrogel.",
"Join a team driven by science and collaboration. We offer an open, supportive environment where your skills can help shape the future of regenerative medicine.",
"Shaqaf Medical manufactures its healthcare products in the UAE and is committed to working closely with trusted distributors to ensure accessibility, integrity, and quality.",
"Currently we have 3 products in preclinical trials: Liver ECM Hydrogel, Kidney ECM Hydrogel, and Pancreas ECM Hydrogel. We have 0 products in development and 0 products in market launch phase."
]
# Test queries
test_queries = [
"Tell me about Shaqaf",
"What products are available?",
"How many products do you have?",
"Can I apply for a job at Shaqaf?",
"How many team members are there?",
"What does Shaqaf Medical do?"
]
print("Testing Enhanced AI Engine with Hugging Face Models")
print("=" * 60)
for query in test_queries:
print(f"\nQuery: {query}")
print("-" * 40)
response = await ai.generate_response(query, sample_content)
print(f"Response: {response}")
print()
if __name__ == "__main__":
asyncio.run(test_ai_responses())