Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -534,8 +534,8 @@ def generate(
|
|
534 |
return
|
535 |
|
536 |
# --- rAgent Reasoning branch ---
|
537 |
-
if text.strip().lower().startswith("@
|
538 |
-
prompt = text[len("@
|
539 |
yield "📝 Initiating reasoning chain using Llama mode..."
|
540 |
# Pass the current chat history (cleaned) to help inform the chain.
|
541 |
for partial in ragent_reasoning(prompt, clean_chat_history(chat_history)):
|
@@ -714,11 +714,11 @@ demo = gr.ChatInterface(
|
|
714 |
gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
|
715 |
],
|
716 |
examples=[
|
717 |
-
[{"text": "@phi4 Solve the problem", "files": ["examples/math.webp"]}],
|
718 |
[{"text": "@phi4 Transcribe the audio to text.", "files": ["examples/harvard.wav"]}],
|
719 |
-
["@tts2 What causes rainbows to form?"],
|
720 |
["@image Chocolate dripping from a donut"],
|
|
|
721 |
["@3d A birthday cupcake with cherry"],
|
|
|
722 |
[{"text": "Summarize the letter", "files": ["examples/1.png"]}],
|
723 |
[{"text": "@yolo", "files": ["examples/yolo.jpeg"]}],
|
724 |
["@ragent Explain how a binary search algorithm works."],
|
@@ -734,7 +734,7 @@ demo = gr.ChatInterface(
|
|
734 |
label="Query Input",
|
735 |
file_types=["image", "audio"],
|
736 |
file_count="multiple",
|
737 |
-
placeholder="@tts1, @tts2, @image, @3d, @phi4, @rAgent, @web, @yolo,
|
738 |
),
|
739 |
stop_btn="Stop Generation",
|
740 |
multimodal=True,
|
|
|
534 |
return
|
535 |
|
536 |
# --- rAgent Reasoning branch ---
|
537 |
+
if text.strip().lower().startswith("@rAgent"):
|
538 |
+
prompt = text[len("@rAgent"):].strip()
|
539 |
yield "📝 Initiating reasoning chain using Llama mode..."
|
540 |
# Pass the current chat history (cleaned) to help inform the chain.
|
541 |
for partial in ragent_reasoning(prompt, clean_chat_history(chat_history)):
|
|
|
714 |
gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
|
715 |
],
|
716 |
examples=[
|
|
|
717 |
[{"text": "@phi4 Transcribe the audio to text.", "files": ["examples/harvard.wav"]}],
|
|
|
718 |
["@image Chocolate dripping from a donut"],
|
719 |
+
[{"text": "@phi4 Summarize the content", "files": ["examples/write.jpg"]}],
|
720 |
["@3d A birthday cupcake with cherry"],
|
721 |
+
["@tts2 What causes rainbows to form?"],
|
722 |
[{"text": "Summarize the letter", "files": ["examples/1.png"]}],
|
723 |
[{"text": "@yolo", "files": ["examples/yolo.jpeg"]}],
|
724 |
["@ragent Explain how a binary search algorithm works."],
|
|
|
734 |
label="Query Input",
|
735 |
file_types=["image", "audio"],
|
736 |
file_count="multiple",
|
737 |
+
placeholder="@tts1, @tts2, @image, @3d, @phi4 [image, audio], @rAgent, @web, @yolo, default [plain text]"
|
738 |
),
|
739 |
stop_btn="Stop Generation",
|
740 |
multimodal=True,
|