You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Develop the backend functionality to handle incoming user input from the frontend, process it, and return a response generated by a model. For testing and demonstration purposes, we will use the Hugging Face model (Salesforce/codet5-base) (https://huggingface.co/Salesforce/codet5-base) as a mock model. This backend API will enable interaction between the frontend’s user input and the model's response, allowing the UI to simulate conversation with an AI model in a chat format.
Acceptance Criteria:
Endpoint Setup:
Create an API endpoint that accepts a POST request with JSON data
Validate the request to ensure the "text" field is present and non-empty.
Process Input with Mock Model:
Use the Hugging Face model Salesforce/codet5-base as a mock to generate responses. This model will serve as a placeholder to test the system until the actual model is integrated.
Integrate the Hugging Face API or Transformers library to interact with the model and process the user’s input.
Model Processing Script:
Set up a Python script using the transformers library that takes in the text input, runs it through the Salesforce/codet5-base model, and returns the generated output.(You can find the model script in the link with description)
This script will serve as a backend utility that can be called by the API to generate responses.
Response Handling:
Return the model’s output in a JSON format so the frontend can display it.
If there is any processing error, return an appropriate error message with a clear HTTP status code.
Error Handling:
Handle possible errors such as invalid input, model processing failures, and server errors.
Provide meaningful error messages for each error type.
Additional Information:
This setup is intended as a mock to test the chat interface and backend flow.
Later, the mock model can be replaced with the actual bioinformatics model once it is ready for integration.
The text was updated successfully, but these errors were encountered:
Develop the backend functionality to handle incoming user input from the frontend, process it, and return a response generated by a model. For testing and demonstration purposes, we will use the Hugging Face model (Salesforce/codet5-base) (https://huggingface.co/Salesforce/codet5-base) as a mock model. This backend API will enable interaction between the frontend’s user input and the model's response, allowing the UI to simulate conversation with an AI model in a chat format.
Acceptance Criteria:
Endpoint Setup:
Process Input with Mock Model:
Model Processing Script:
Response Handling:
Error Handling:
Additional Information:
The text was updated successfully, but these errors were encountered: