medical_model / app_simple.py
Deva1211's picture
Fixed duplicate function issue
b4ee383
raw
history blame contribute delete
817 Bytes
import gradio as gr
import os
from huggingface_hub import login
# Login with the secret token
login(token=os.getenv("HF_TOKEN"))
def simple_response(message, history):
"""Simple response function for testing"""
if not message:
return "Please enter a message"
return f"Echo: {message} (This is a test response - model loading disabled for testing)"
# Create simple interface
demo = gr.ChatInterface(
simple_response,
title="🏥 MedLLaMA2 Medical Chatbot (Test Mode)",
description="Test version to verify Gradio deployment works",
examples=[
["Hello, can you help me?"],
["What is diabetes?"],
["Tell me about healthy eating"]
]
)
if __name__ == "__main__":
demo.launch(
share=True,
show_error=True,
debug=True
)