Spaces:
Configuration error
Configuration error
Upload 2 files
Browse files- README.md +20 -17
- requirements.txt +3 -3
README.md
CHANGED
|
@@ -1,20 +1,23 @@
|
|
| 1 |
-
|
| 2 |
-
title: Code Explainer
|
| 3 |
-
emoji: 🚀
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: red
|
| 6 |
-
sdk: docker
|
| 7 |
-
app_port: 8501
|
| 8 |
-
tags:
|
| 9 |
-
- streamlit
|
| 10 |
-
pinned: false
|
| 11 |
-
short_description: Streamlit template space
|
| 12 |
-
license: mit
|
| 13 |
-
---
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Code Explainer 🧠
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
This project uses the `bigcode/starcoder` model to explain Python code in plain English.
|
| 4 |
|
| 5 |
+
## How to Run
|
| 6 |
|
| 7 |
+
```bash
|
| 8 |
+
pip install -r requirements.txt
|
| 9 |
+
streamlit run app/main.py
|
| 10 |
+
```
|
| 11 |
+
|
| 12 |
+
## Example
|
| 13 |
+
|
| 14 |
+
Input:
|
| 15 |
+
```python
|
| 16 |
+
def fibonacci(n):
|
| 17 |
+
if n <= 1:
|
| 18 |
+
return n
|
| 19 |
+
return fibonacci(n-1) + fibonacci(n-2)
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
Output:
|
| 23 |
+
> This function calculates the nth Fibonacci number using recursion...
|
requirements.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
streamlit
|
|
|
|
| 1 |
+
transformers
|
| 2 |
+
torch
|
| 3 |
+
streamlit
|