# Tutorial for Sending a Machine Learning Inference Request (Non Dev Version)

By [ForumAI](https://paragraph.com/@forumai) · 2024-07-11

---

Not a dev? No problem! Here’s a simplified version for non-developers to help you get the [ML request done](https://forumai.gitbook.io/forumai/forumai/machine-learning-inference-request) and accomplish your basic tasks:

### Prerequisites

1.  **Install Python**:
    
    *   Download Python from the official website: [Python Downloads](https://www.python.org/downloads/)
        
    *   Run the installer and follow the steps to complete the installation.
        
2.  **Install pip**:
    
    *   Ensure pip is installed by running `pip --version` or `pip3 --version` in the terminal.
        
    *   If not installed, follow the [pip installation guide](https://pip.pypa.io/en/stable/installation/).
        
3.  **Obtain sFuel from SKEL testnet**:
    
    *   Visit the [sFuel Station](https://www.sfuelstation.com/).
        
    *   Connect your wallet.
        
    *   Claim your sFuel as gas fee to use on the Titan AI Hub chain.
        

### Step-by-Step Instructions

1.  **Install the ForumAI SDK**:
    
    *   Open your terminal (Command + Space, type “Terminal”).
        
    *   Run the following command to install the ForumAI SDK:
        
2.  **Prepare Your Wallet**:
    
    *   Write down the wallet address and the private key of your crypto (EVM) wallet.
        
    *   Ensure your wallet is funded with sFuel to cover the gas fees.
        
3.  **Python Shell**:
    
    *   Open the terminal and start the Python shell by typing:
        
4.  **Import and Initialize the Model Market**:
    
    *   Copy and paste the following code into the Python shell. Replace `your_private_key_here` and `your_public_key_here` with your actual wallet's private key and address:
        
            from ModelMarketSDK.ModelMarket import Mixtral8x7BModelMarketTestnet
            
            # Initialize the model market with your credentials
            model_market = Mixtral8x7BModelMarketTestnet(
                "your_private_key_here",
                "your_public_key_here"
            )
            
        
    
    You should see “Initialized!” Then you are good to go to the final step.
    
5.  **Send a Machine Learning Inference Request**:
    
    *   Define your chat input. The default question is "What is 2+2?" for testing. You can replace "What is 2+2?" with your question:
        
            chat = [{"role": "system", "content": "You are a helpful assistant!"}, {"role": "user", "content": "What is 2+2?"}]
            response = model_market.generate(3000, chat)
            print(response)
            
        

Then you should see the answer below:”>>> print(response)

The answer is 4. Is there anything else you would like to know? I'm here to help!”Congrats! You have made your first successful ML request!

Here’s how it should look like:

![Example: Step 3 to Step 5](https://storage.googleapis.com/papyrus_images/fcd5e403e9442c4657432a5cd724b34645f4c765a4b84b5d5f5092e03521a609.png)

Example: Step 3 to Step 5

### Common Issues and Solutions

**Command Not Found Errors**:

*   If you encounter `command not found: pip`, try using `pip3` instead.
    
*   Ensure Python and pip are correctly installed and added to your system's PATH.
    

**Module Not Found Errors**:

*   Ensure the ForumAI SDK is correctly installed. Run:
    
        pip3 show forumaisdk
        
    
*   If not installed, reinstall it using:
    

**NameError: name 'Mixtral8x7BModelMarketTestnet' is not defined**:

*   Ensure there are no typos in the import statement. The correct import statement is:
    
        from ModelMarketSDK.ModelMarket import Mixtral8x7BModelMarketTestnet
        
    

**Gas Fee Issues**:

*   Ensure your wallet has enough sFuel.
    
*   Double-check you are on the correct testnet setting.
    

### Additional Resources

*   [ForumAI “Inception” Testnet](https://www.forumai.dev/testnet)
    
*   [ForumAI Technical Documentation](https://forumai.com/docs)
    
*   [ForumAI “Inception” Testnet Documentation](https://forumai.com/docs/testnet)
    
*   [Testnet Machine Learning Request Guide](https://forumai.com/docs/testnet-guide)
    
*   [Pip Installation Guide](https://pip.pypa.io/en/stable/installation/)
    

By following these detailed steps, you should be able to successfully send a machine learning inference request using the ForumAI SDK.If you encounter any issues, refer to the common problems and solutions section or consult the ForumAI technical documentation for further assistance.  
  
[Website](https://www.forumai.dev/) l [Docs](https://forumai.gitbook.io/forumai) l [Twitter](https://twitter.com/ForumAILabs) l [Discord](https://discord.com/invite/nMraVjaAq4) l [Telegram](https://t.me/OfficalForumAI)

---

*Originally published on [ForumAI](https://paragraph.com/@forumai/tutorial-for-sending-a-machine-learning-inference-request-non-dev-version)*
