Spaces:
Build error
Build error
Update app.py
Browse files97 unmodified lines989910010110210310410510610710810911011111211330 unmodified lines14414514613714797 unmodified lines
try: bot_response = demo(relevant_text) # Pass the string to the model logging.info(f"Model Output: {bot_response}") # Log the output for debugging
# Handle different output formats if isinstance(bot_response, dict) and "response" in bot_response: bot_response = bot_response["response"] elif isinstance(bot_response, list): bot_response = " ".join(bot_response) # Concatenate list into a string elif not isinstance(bot_response, str): bot_response = str(bot_response) # Convert to string if not already
except Exception as e: logging.error(f"DeepSeek model error: {e}") bot_response = "I'm having trouble generating a response right now."30 unmodified lines
# Launch the Gradio appif __name__ == "__main__": app.launch(debug=True) app.launch(debug=True)app.py+11-1