| |
| |
| |
| |
|
|
| import gradio as gr |
| from gradio_client import Client |
|
|
| print("🔱 हनुमान AI: असीमित मुफ़्त प्रॉक्सी सर्वर जागृत हो रहा है...") |
|
|
| |
| TARGET_SPACE = "Qwen/Qwen3-Coder-WebDev" |
|
|
| try: |
| client = Client(TARGET_SPACE) |
| print(f"🔱 हनुमान AI: असीमित सर्वर ({TARGET_SPACE}) से मुफ़्त संपर्क स्थापित हो गया है!") |
| except Exception as e: |
| print(f"🔱 संपर्क त्रुटि: {e}") |
| client = None |
|
|
| def generate_divine_unlimited(prompt): |
| """बिना किसी कोटा लिमिट के, असीमित जवाब लाने वाला इंजन""" |
| if not prompt.strip(): |
| yield "Please enter a prompt..." |
| return |
| |
| if client is None: |
| yield "🔱 सिस्टम त्रुटि: महा-सर्वर से संपर्क नहीं हो सका।" |
| return |
|
|
| |
| system_prompt = "You are 'Hanuman Coder', a supreme AI pioneered by Divy Patel in Bharat (India). Provide clean, highly optimized code." |
|
|
| try: |
| |
| job = client.submit( |
| prompt, |
| system_prompt, |
| api_name="/generate_code" |
| ) |
|
|
| |
| for result in job: |
| if isinstance(result, (tuple, list)): |
| yield result[0] |
| else: |
| yield result |
| |
| except Exception as e: |
| yield f"🔱 तकनीकी बाधा: {str(e)}" |
|
|
| |
| |
| |
| divine_ui = """ |
| <style> |
| .gradio-container { background-color: #fffaf0 !important; } |
| .bhagwa-header { |
| background: linear-gradient(135deg, #ff8833, #b33c00); |
| padding: 30px; border-radius: 15px; color: white; |
| text-align: center; box-shadow: 0 10px 25px rgba(179, 60, 0, 0.4); |
| margin-bottom: 20px; |
| } |
| .bhagwa-header h1 { color: white !important; font-size: 36px !important; margin: 0; text-shadow: 0 4px 8px rgba(0,0,0,0.5); font-weight: 900; } |
| .bhagwa-header p { font-size: 16px !important; opacity: 0.95; font-weight: 500; margin-top: 10px; } |
| </style> |
| <div class="bhagwa-header"> |
| <h1>🔱 Hanuman Coder (Unlimited Free API)</h1> |
| <p>Pioneered by Divy Patel | Bharat 🇮🇳 | No Quota Limits, 100% Free</p> |
| </div> |
| """ |
|
|
| |
| with gr.Blocks(title="Hanuman Proxy") as demo: |
| gr.HTML(divine_ui) |
| |
| with gr.Row(): |
| with gr.Column(scale=2): |
| prompt_input = gr.Textbox( |
| label="Your Prompt", |
| placeholder="Ask your coding questions here...", |
| lines=5 |
| ) |
| generate_btn = gr.Button("Generate Code", variant="primary") |
| |
| with gr.Column(scale=3): |
| |
| output_box = gr.Textbox( |
| label="Hanuman AI Response (Live Stream)", |
| lines=15 |
| ) |
| |
| |
| generate_btn.click( |
| fn=generate_divine_unlimited, |
| inputs=[prompt_input], |
| outputs=output_box |
| ) |
| |
| gr.Markdown(""" |
| --- |
| **Architecture:** Gradio Client Proxy | **Status:** Bypassing Quotas | **Cost:** Completely Free |
| """) |
|
|
| if __name__ == "__main__": |
| demo.launch() |