Spaces:
Runtime error
Runtime error
Commit
·
4d32a09
1
Parent(s):
84fadff
Upload folder using huggingface_hub
Browse files- danskgpt-chat/main.py +3 -3
danskgpt-chat/main.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
import json
|
| 4 |
-
|
| 5 |
def http_bot(prompt, history, system_prompt, endpoint_url):
|
| 6 |
# Initialize the formatted_chat string with the system prompt
|
| 7 |
formatted_chat = f"{system_prompt}\n"
|
|
@@ -41,7 +41,7 @@ def http_bot(prompt, history, system_prompt, endpoint_url):
|
|
| 41 |
|
| 42 |
|
| 43 |
with gr.Blocks(theme=gr.themes.Soft(), title="DanskGPT") as demo:
|
| 44 |
-
gr.Markdown("# DanskGPT
|
| 45 |
gr.Markdown("Et dansk alternativ til ChatGPT der kører lokalt.")
|
| 46 |
system_prompt = gr.Textbox(value="Du er en dansk AI-assistent. Du vil blive givet en opgave. Du skal hjælpe så meget du kan.",
|
| 47 |
label="System besked")
|
|
@@ -58,7 +58,7 @@ with gr.Blocks(theme=gr.themes.Soft(), title="DanskGPT") as demo:
|
|
| 58 |
|
| 59 |
)
|
| 60 |
|
| 61 |
-
gr.Markdown("Version
|
| 62 |
gr.Markdown("Lavet af Mads Henrichsen - Kontakt: [email protected]")
|
| 63 |
gr.Markdown("Bemærk: DanskGPT producerer ikke nødvendigvis sandfærdig information - der er en ny model på vej der er meget bedre til dette.")
|
| 64 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
import json
|
| 4 |
+
|
| 5 |
def http_bot(prompt, history, system_prompt, endpoint_url):
|
| 6 |
# Initialize the formatted_chat string with the system prompt
|
| 7 |
formatted_chat = f"{system_prompt}\n"
|
|
|
|
| 41 |
|
| 42 |
|
| 43 |
with gr.Blocks(theme=gr.themes.Soft(), title="DanskGPT") as demo:
|
| 44 |
+
gr.Markdown("# DanskGPT")
|
| 45 |
gr.Markdown("Et dansk alternativ til ChatGPT der kører lokalt.")
|
| 46 |
system_prompt = gr.Textbox(value="Du er en dansk AI-assistent. Du vil blive givet en opgave. Du skal hjælpe så meget du kan.",
|
| 47 |
label="System besked")
|
|
|
|
| 58 |
|
| 59 |
)
|
| 60 |
|
| 61 |
+
gr.Markdown("Version 1 - chatmodel trænet på data op til 31-06-2023.")
|
| 62 |
gr.Markdown("Lavet af Mads Henrichsen - Kontakt: [email protected]")
|
| 63 |
gr.Markdown("Bemærk: DanskGPT producerer ikke nødvendigvis sandfærdig information - der er en ny model på vej der er meget bedre til dette.")
|
| 64 |
|