Spaces:
Sleeping
Sleeping
File size: 817 Bytes
b4ee383 |
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 |
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
)
|