Spaces:
Runtime error
Runtime error
Upload with huggingface_hub
Browse files- app.py +21 -0
- requirements.txt +4 -0
app.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from chat import gradio as chat
|
| 3 |
+
from ner import gradio as ner
|
| 4 |
+
from math_demo import gradio as math_demo
|
| 5 |
+
from bash import gradio as bash
|
| 6 |
+
from pal import gradio as pal
|
| 7 |
+
from gatsby import gradio as gatsby
|
| 8 |
+
from qa import gradio as qa
|
| 9 |
+
from stats import gradio as stats
|
| 10 |
+
|
| 11 |
+
css = "#clean div.form {border: 0px} #response {border: 0px; background: #ffeec6} #prompt {border: 0px;background: aliceblue} #json {border: 0px} #result {border: 0px; background: #c5e0e5} #inner {padding: 20px} #inner textarea {border: 0px} .tabs div.tabitem {border: 0px}"
|
| 12 |
+
|
| 13 |
+
with gr.Blocks(css=css) as demo:
|
| 14 |
+
gr.HTML("<center> <img width='10%' style='display:inline; padding: 5px' src='https://user-images.githubusercontent.com/35882/218286642-67985b6f-d483-49be-825b-f62b72c469cd.png'> <h1 style='display:inline'> Mini-Chain </h1> <img width='10%' style='display:inline;padding: 5px' src='https://avatars.githubusercontent.com/u/25720743?s=200&v=4'> </center><br><center><a href='https://github.com/srush/minichain'>[code]</a> <a href='https://user-images.githubusercontent.com/35882/218286642-67985b6f-d483-49be-825b-f62b72c469cd.png'>[docs]</a></center>")
|
| 15 |
+
|
| 16 |
+
gr.TabbedInterface([math_demo, qa, chat, gatsby, ner, bash, pal, stats],
|
| 17 |
+
["Math", "QA", "Chat", "Book", "NER", "Bash", "PAL", "Stats"],
|
| 18 |
+
css = css)
|
| 19 |
+
|
| 20 |
+
demo.launch()
|
| 21 |
+
|
requirements.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio==3.21.0
|
| 2 |
+
git+https://github.com/srush/minichain@gradio
|
| 3 |
+
manifest-ml
|
| 4 |
+
faiss-cpu
|