Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ def query_tqa(query, search_level):
|
|
| 49 |
# rag_index, query, search_level
|
| 50 |
# )
|
| 51 |
return (
|
| 52 |
-
grag_response,
|
| 53 |
# grag_reference,
|
| 54 |
# grag_reference_text,
|
| 55 |
# rag_response,
|
|
@@ -145,14 +145,7 @@ def reveal_coupon(query, grag_response):
|
|
| 145 |
|
| 146 |
coupon = get_coupon(query, grag_response)
|
| 147 |
return coupon
|
| 148 |
-
|
| 149 |
-
PLACEHOLDER = """<div style="padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
| 150 |
-
<img src="https://ysharma-dummy-chat-app.hf.space/file=/tmp/gradio/c21ff9c8e7ecb2f7d957a72f2ef03c610ac7bbc4/Meta_lockup_positive%20primary_RGB_small.jpg" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55; margin-bottom: 10px;">
|
| 151 |
-
<h1 style="font-size: 28px; margin: 0;">Meta llama3.2</h1>
|
| 152 |
-
<p style="font-size: 18px; margin: 5px 0 0; opacity: 0.65;">
|
| 153 |
-
<a href="https://huggingface.co/blog/llama32" target="_blank" style="color: inherit; text-decoration: none;">Learn more about Llama 3.2</a>
|
| 154 |
-
</p>
|
| 155 |
-
</div>"""
|
| 156 |
|
| 157 |
|
| 158 |
with gr.Blocks() as demo:
|
|
@@ -165,7 +158,7 @@ with gr.Blocks() as demo:
|
|
| 165 |
# {"text": "How much iphone cost?"},
|
| 166 |
# {"text": "What phone options do i have ?"}
|
| 167 |
# ],
|
| 168 |
-
|
| 169 |
)
|
| 170 |
msg = gr.Textbox(label="Input Your Query")
|
| 171 |
clear = gr.ClearButton([msg, chatbot])
|
|
|
|
| 49 |
# rag_index, query, search_level
|
| 50 |
# )
|
| 51 |
return (
|
| 52 |
+
grag_response.response,
|
| 53 |
# grag_reference,
|
| 54 |
# grag_reference_text,
|
| 55 |
# rag_response,
|
|
|
|
| 145 |
|
| 146 |
coupon = get_coupon(query, grag_response)
|
| 147 |
return coupon
|
| 148 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
|
| 151 |
with gr.Blocks() as demo:
|
|
|
|
| 158 |
# {"text": "How much iphone cost?"},
|
| 159 |
# {"text": "What phone options do i have ?"}
|
| 160 |
# ],
|
| 161 |
+
|
| 162 |
)
|
| 163 |
msg = gr.Textbox(label="Input Your Query")
|
| 164 |
clear = gr.ClearButton([msg, chatbot])
|