File size: 1,510 Bytes
845bf9e
f13f1c5
33912ad
 
 
 
 
 
 
845bf9e
 
f13f1c5
3dc1e5a
f13f1c5
3dc1e5a
 
 
f13f1c5
 
3dc1e5a
 
f13f1c5
c742cde
 
 
f13f1c5
c742cde
 
 
 
3dc1e5a
 
 
 
 
f13f1c5
3dc1e5a
 
 
f13f1c5
60de078
f13f1c5
3dc1e5a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: Coding Expert AI Chatbot
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
---

# Coding Expert AI Chatbot

This is a chatbot application built with Gradio and powered by Microsoft's Phi-2 model, which is specialized in coding and general conversational tasks.

## Features

- AI powered by Phi-2 (2.7B parameters), excellent for coding assistance
- Streaming responses for faster interaction (text appears as it's generated)
- Gradio interface for easy interaction
- Maintains conversation history
- Supports Hugging Face token for accessing models

## Setup

To use a Hugging Face token (recommended):

1. Create a Hugging Face account at https://huggingface.co
2. Generate a token at https://huggingface.co/settings/tokens
3. In your Space settings, add the token as an environment variable named `HF_TOKEN`

## Usage

1. Run the app: `python app.py`
2. Open your browser to the provided URL
3. Start chatting with the AI! It can help with coding questions and general conversations.

## Model

The app uses `microsoft/phi-2`, a 2.7B parameter model fine-tuned for coding and instruction-following tasks. It's larger than previous models and provides better responses, especially for technical questions.

Note: This model may take longer to load and respond on free-tier hosting, but responses stream in real-time.

## Built with anycoder

[Built with anycoder](https://huggingface.co/spaces/akhaliq/anycoder) - AI-powered code generation.