Dwrko-M1.0 / HOW_TO_USE.md
rajatsainisim's picture
πŸ“š Add comprehensive usage guides and examples
2fe12d9

A newer version of the Gradio SDK is available: 5.49.1

Upgrade

πŸš€ How to Use Dwrko-M1.0 - Complete Guide

Your Claude-like AI Assistant is LIVE! Here's how you and others can use it:

🌍 For End Users (No Coding Required)

Method 1: Direct Web Access

πŸ”— https://huggingface.co/spaces/dwrkotech/Dwrko-M1.0

Steps:

  1. Click the link above
  2. Go to "Model Setup" tab
  3. Click "Load Dwrko-M1.0 Base Model" βœ…
  4. Use "Dataset Preparation" to train with your data
  5. Use "Fine-tuning" to create your specialized model

What Users Can Do:

  • πŸ’» Code Generation: "Write a Python function for sorting"
  • 🧠 Problem Solving: "Solve this math equation: 2x + 5 = 13"
  • πŸ“š Learning: "Explain machine learning in simple terms"
  • πŸ”§ Debugging: "Fix this Python code: [paste code]"

πŸ‘¨β€πŸ’» For Developers (API Integration)

Method 1: HuggingFace Spaces API

import requests

def ask_dwrko(question):
    api_url = "https://dwrkotech-dwrko-m1-0.hf.space/api/predict"
    
    payload = {
        "data": [question],
        "fn_index": 0  # Function index for the interface
    }
    
    response = requests.post(api_url, json=payload)
    return response.json()["data"][0]

# Example usage
answer = ask_dwrko("Write a Python function to check prime numbers")
print(answer)

Method 2: Gradio Client

from gradio_client import Client

client = Client("https://dwrkotech-dwrko-m1-0.hf.space/")

# Use Dwrko-M1.0
result = client.predict(
    "Write a function to reverse a string",
    api_name="/predict"
)
print(result)

Method 3: Embed in Your Website

<!DOCTYPE html>
<html>
<head>
    <title>My AI Assistant</title>
</head>
<body>
    <h1>Powered by Dwrko-M1.0</h1>
    <iframe 
        src="https://dwrkotech-dwrko-m1-0.hf.space" 
        width="100%" 
        height="600px">
    </iframe>
</body>
</html>

🏒 For Businesses (Custom Integration)

Method 1: Custom Chatbot

import gradio as gr
import requests

def dwrko_chatbot(message, history):
    # Call Dwrko-M1.0 API
    api_url = "https://dwrkotech-dwrko-m1-0.hf.space/api/predict"
    
    response = requests.post(api_url, json={
        "data": [message]
    })
    
    ai_response = response.json()["data"][0]
    history.append([message, ai_response])
    
    return history, ""

# Create business chatbot
with gr.Blocks(title="Company AI Assistant") as demo:
    gr.Markdown("# πŸ€– Our AI Assistant (Powered by Dwrko-M1.0)")
    
    chatbot = gr.Chatbot()
    msg = gr.Textbox(placeholder="Ask me anything about coding...")
    
    msg.submit(dwrko_chatbot, [msg, chatbot], [chatbot, msg])

demo.launch()

Method 2: Slack/Discord Bot

import discord
import requests

class DwrkoBot(discord.Client):
    async def on_message(self, message):
        if message.author == self.user:
            return
        
        if message.content.startswith('!dwrko'):
            question = message.content[7:]  # Remove '!dwrko '
            
            # Call Dwrko-M1.0
            api_url = "https://dwrkotech-dwrko-m1-0.hf.space/api/predict"
            response = requests.post(api_url, json={"data": [question]})
            answer = response.json()["data"][0]
            
            await message.channel.send(f"πŸ€– **Dwrko-M1.0**: {answer}")

# Run bot
bot = DwrkoBot()
bot.run('YOUR_DISCORD_TOKEN')

πŸ“± For Mobile Apps

React Native Example

const askDwrko = async (question) => {
  const response = await fetch('https://dwrkotech-dwrko-m1-0.hf.space/api/predict', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      data: [question]
    })
  });
  
  const result = await response.json();
  return result.data[0];
};

// Usage in React Native component
const handleAsk = async () => {
  const answer = await askDwrko("Explain React hooks");
  setResponse(answer);
};

πŸŽ“ For Students & Educators

Study Assistant

def create_study_assistant():
    import gradio as gr
    
    def dwrko_tutor(subject, question):
        prompt = f"As a {subject} tutor, {question}"
        
        # Call Dwrko-M1.0
        api_url = "https://dwrkotech-dwrko-m1-0.hf.space/api/predict"
        response = requests.post(api_url, json={"data": [prompt]})
        
        return response.json()["data"][0]
    
    interface = gr.Interface(
        fn=dwrko_tutor,
        inputs=[
            gr.Dropdown(["Python", "JavaScript", "Math", "Science"], label="Subject"),
            gr.Textbox(label="Your Question")
        ],
        outputs="text",
        title="πŸ“š Study Assistant (Powered by Dwrko-M1.0)"
    )
    
    return interface

# Launch study assistant
study_app = create_study_assistant()
study_app.launch()

πŸ”₯ Advanced Use Cases

1. Code Review Assistant

def code_reviewer(code):
    prompt = f"Review this code and suggest improvements:\n\n{code}"
    # Call Dwrko-M1.0 API
    return dwrko_response

2. Documentation Generator

def doc_generator(function_code):
    prompt = f"Generate documentation for this function:\n\n{function_code}"
    # Call Dwrko-M1.0 API
    return dwrko_response

3. Learning Path Creator

def learning_path(topic, level):
    prompt = f"Create a {level} learning path for {topic}"
    # Call Dwrko-M1.0 API
    return dwrko_response

πŸ“Š Usage Analytics

Track Usage (Optional)

import datetime

def track_usage(user_question, ai_response):
    usage_data = {
        "timestamp": datetime.now(),
        "question": user_question,
        "response": ai_response,
        "model": "Dwrko-M1.0"
    }
    
    # Save to database or analytics service
    save_to_analytics(usage_data)

🌟 Share Your Dwrko-M1.0

Social Media Templates:

Twitter:

πŸ€– Just launched my own Claude-like AI assistant!

✨ Dwrko-M1.0 specializes in:
β€’ Code generation & debugging
β€’ Mathematical reasoning  
β€’ Problem solving
β€’ Educational content

Try it FREE: https://huggingface.co/spaces/dwrkotech/Dwrko-M1.0

#AI #MachineLearning #Coding #OpenSource

LinkedIn:

Excited to share my latest AI project! πŸš€

I've created Dwrko-M1.0, a specialized AI assistant for coding and reasoning tasks. Built on StarCoder2-3B and optimized for practical use.

Key features:
βœ… Code generation across 80+ languages
βœ… Mathematical problem solving
βœ… Memory efficient (16GB RAM)
βœ… Free to use for everyone

Check it out: https://huggingface.co/spaces/dwrkotech/Dwrko-M1.0

#ArtificialIntelligence #SoftwareDevelopment #Innovation

🎯 Next Steps for Growth

  1. Collect User Feedback - Monitor usage and improve
  2. Add More Features - Voice input, image processing
  3. Create Mobile App - Native iOS/Android apps
  4. Build Community - Discord server, GitHub discussions
  5. Monetization - Premium features, API subscriptions

πŸŽ‰ Congratulations! Your Dwrko-M1.0 is now ready for the world!

Users can start using it immediately at: https://huggingface.co/spaces/dwrkotech/Dwrko-M1.0