Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,32 +27,32 @@ def response_from_llam3(query):
|
|
27 |
return response.choices[0].message.content
|
28 |
|
29 |
|
30 |
-
iface = gr.Interface(
|
31 |
-
gr.Markdown("<h1>π Ayurveda Mate π¦</h1>")
|
32 |
-
gr.Markdown("<h3> πΉοΈ Type your questions or prompts below and see how each model responds to the same input πΎ </h3>")
|
33 |
-
fn=response_from_llam3,
|
34 |
-
inputs="text",
|
35 |
-
outputs="text",
|
36 |
-
examples=[
|
37 |
-
['What is importance of fasting according to Ayurveda?'],
|
38 |
-
['What are the medicinal values of Tusli?'],
|
39 |
-
['What are the three different doshas?'],
|
40 |
-
['What is the ideal diet according to ayurveda?']
|
41 |
-
],
|
42 |
-
cache_examples=False,
|
43 |
-
)
|
44 |
-
iface.launch()
|
45 |
-
|
46 |
-
# with gr.Blocks() as demo:
|
47 |
# gr.Markdown("<h1>π Ayurveda Mate π¦</h1>")
|
48 |
# gr.Markdown("<h3> πΉοΈ Type your questions or prompts below and see how each model responds to the same input πΎ </h3>")
|
49 |
-
#
|
50 |
-
#
|
51 |
-
#
|
52 |
-
#
|
53 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
|
|
27 |
return response.choices[0].message.content
|
28 |
|
29 |
|
30 |
+
# iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
# gr.Markdown("<h1>π Ayurveda Mate π¦</h1>")
|
32 |
# gr.Markdown("<h3> πΉοΈ Type your questions or prompts below and see how each model responds to the same input πΎ </h3>")
|
33 |
+
# fn=response_from_llam3,
|
34 |
+
# inputs="text",
|
35 |
+
# outputs="text",
|
36 |
+
# examples=[
|
37 |
+
# ['What is importance of fasting according to Ayurveda?'],
|
38 |
+
# ['What are the medicinal values of Tusli?'],
|
39 |
+
# ['What are the three different doshas?'],
|
40 |
+
# ['What is the ideal diet according to ayurveda?']
|
41 |
+
# ],
|
42 |
+
# cache_examples=False,
|
43 |
+
# )
|
44 |
+
# iface.launch()
|
45 |
+
|
46 |
+
with gr.Blocks() as demo:
|
47 |
+
gr.Markdown("<h1>π Ayurveda Mate π¦</h1>")
|
48 |
+
gr.Markdown("<h3> πΉοΈ Type your questions or prompts below and see how each model responds to the same input πΎ </h3>")
|
49 |
+
with gr.Row():
|
50 |
+
input_text = gr.Textbox(label="Enter your prompt here:", placeholder="Type something...", lines=2)
|
51 |
+
submit_button = gr.Button("Submit")
|
52 |
+
output_llama = gr.Textbox(label="Llama 3 8B πΎ", placeholder="", lines=10, interactive=False)
|
53 |
+
output_mistral = gr.Textbox(label="Mistral 7B π ", placeholder="", lines=10, interactive=False)
|
54 |
|
55 |
+
submit_button.click(fn=response_from_llam3, inputs="text", outputs="text")
|
56 |
|
57 |
+
if __name__ == "__main__":
|
58 |
+
demo.launch()
|