Spaces:
Build error
Build error
Upload folder using huggingface_hub
Browse files- README.md +3 -9
- __pycache__/app.cpython-311.pyc +0 -0
- app.py +18 -0
- embedchain.json +3 -0
- generate_explanation.py +0 -0
- requirements.txt +3 -0
README.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji: 🦀
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: blue
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 4.27.0
|
| 8 |
app_file: app.py
|
| 9 |
-
|
|
|
|
| 10 |
---
|
| 11 |
-
|
| 12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: my-node-learning-app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
app_file: app.py
|
| 4 |
+
sdk: gradio
|
| 5 |
+
sdk_version: 4.11.0
|
| 6 |
---
|
|
|
|
|
|
__pycache__/app.cpython-311.pyc
ADDED
|
Binary file (759 Bytes). View file
|
|
|
app.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
from embedchain import App
|
| 6 |
+
|
| 7 |
+
os.environ["OPENAI_API_KEY"] = "sk-xxx"
|
| 8 |
+
|
| 9 |
+
app = App()
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def query(message, history):
|
| 13 |
+
return app.chat(message)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
demo = gr.ChatInterface(query)
|
| 17 |
+
|
| 18 |
+
demo.launch()
|
embedchain.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"provider": "gradio.app"
|
| 3 |
+
}
|
generate_explanation.py
ADDED
|
File without changes
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio==4.11.0
|
| 2 |
+
embedchain
|
| 3 |
+
requests
|