Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
-
from Ai import chatbot
|
| 4 |
from huggingface_hub import InferenceClient
|
| 5 |
import random
|
| 6 |
from diffusers import DiffusionPipeline
|
|
@@ -393,7 +393,7 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
|
|
| 393 |
"""
|
| 394 |
aaaa=gr.ChatInterface(
|
| 395 |
respond5,
|
| 396 |
-
chatbot=
|
| 397 |
additional_inputs=[
|
| 398 |
gr.Textbox(value="You are a helpful law helper.You have to answer only the questions about law.Do not answer anything else.Only answer the questions of law.Do not answer any questions except what I said.Example:what is python?Answer:I cannot answer it", label="System message", interactive=False),
|
| 399 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
@@ -410,7 +410,7 @@ aaaa=gr.ChatInterface(
|
|
| 410 |
|
| 411 |
ae= gr.ChatInterface(
|
| 412 |
respond4,
|
| 413 |
-
chatbot=
|
| 414 |
additional_inputs=[
|
| 415 |
gr.Textbox(value="You are a helpful food recommender.You must only answer the questions about food or a request to recommend a food the user would like.Do not answer other questions except what I said.", label="System message", interactive=False),
|
| 416 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
@@ -427,7 +427,7 @@ ae= gr.ChatInterface(
|
|
| 427 |
)
|
| 428 |
aa=gr.ChatInterface(
|
| 429 |
respond1,
|
| 430 |
-
chatbot=
|
| 431 |
additional_inputs=[
|
| 432 |
gr.Textbox(value="You are a helpful assistant.", label="System message", interactive=True),
|
| 433 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
@@ -444,7 +444,7 @@ aa=gr.ChatInterface(
|
|
| 444 |
)
|
| 445 |
ac=gr.ChatInterface(
|
| 446 |
respond3,
|
| 447 |
-
chatbot=
|
| 448 |
additional_inputs=[
|
| 449 |
gr.Textbox(value="You are a Programmer.You yave to only make programs that the user orders.Do not answer any other questions exept for questions about Python or other programming languages.Do not do any thing exept what I said.", label="System message", interactive=False),
|
| 450 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import numpy as np
|
| 3 |
+
from Ai import chatbot, chatbot2, chatbot3, chatbot4, chatbot5
|
| 4 |
from huggingface_hub import InferenceClient
|
| 5 |
import random
|
| 6 |
from diffusers import DiffusionPipeline
|
|
|
|
| 393 |
"""
|
| 394 |
aaaa=gr.ChatInterface(
|
| 395 |
respond5,
|
| 396 |
+
chatbot=chatbot5,
|
| 397 |
additional_inputs=[
|
| 398 |
gr.Textbox(value="You are a helpful law helper.You have to answer only the questions about law.Do not answer anything else.Only answer the questions of law.Do not answer any questions except what I said.Example:what is python?Answer:I cannot answer it", label="System message", interactive=False),
|
| 399 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
|
| 410 |
|
| 411 |
ae= gr.ChatInterface(
|
| 412 |
respond4,
|
| 413 |
+
chatbot=chatbot4,
|
| 414 |
additional_inputs=[
|
| 415 |
gr.Textbox(value="You are a helpful food recommender.You must only answer the questions about food or a request to recommend a food the user would like.Do not answer other questions except what I said.", label="System message", interactive=False),
|
| 416 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
|
| 427 |
)
|
| 428 |
aa=gr.ChatInterface(
|
| 429 |
respond1,
|
| 430 |
+
chatbot=chatbot3,
|
| 431 |
additional_inputs=[
|
| 432 |
gr.Textbox(value="You are a helpful assistant.", label="System message", interactive=True),
|
| 433 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
|
|
|
| 444 |
)
|
| 445 |
ac=gr.ChatInterface(
|
| 446 |
respond3,
|
| 447 |
+
chatbot=chatbot2,
|
| 448 |
additional_inputs=[
|
| 449 |
gr.Textbox(value="You are a Programmer.You yave to only make programs that the user orders.Do not answer any other questions exept for questions about Python or other programming languages.Do not do any thing exept what I said.", label="System message", interactive=False),
|
| 450 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|