Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import google.generativeai as genai
|
|
| 2 |
import gradio as gr
|
| 3 |
import os
|
| 4 |
from huggingface_hub import InferenceClient
|
|
|
|
| 5 |
|
| 6 |
client = InferenceClient("Satyam-Singh/LLaVa-Large-Language-Virtual-Assistant")
|
| 7 |
|
|
@@ -107,19 +108,10 @@ def gemini_chat(message, history):
|
|
| 107 |
return response.text
|
| 108 |
|
| 109 |
|
| 110 |
-
|
| 111 |
-
examples=[["I'm planning a vacation to India. Can you suggest a one-week itinerary including must-visit places and local cuisines to try?", None, None, None, None, None, ],
|
| 112 |
-
["Can you write a short story about a time-traveling detective who solves historical mysteries?", None, None, None, None, None,],
|
| 113 |
-
["I'm trying to learn French. Can you provide some common phrases that would be useful for a beginner, along with their pronunciations?", None, None, None, None, None,],
|
| 114 |
-
["I have paneer, rice, and bell peppers in my kitchen. Can you suggest an easy recipe I can make with these ingredients?", None, None, None, None, None,],
|
| 115 |
-
["Can you explain how the QuickSort algorithm works and provide a Python implementation?", None, None, None, None, None,],
|
| 116 |
-
["What are some unique features of Python that make it stand out compared to other systems programming languages like C++,Java?", None, None, None, None, None,],
|
| 117 |
-
]
|
| 118 |
-
|
| 119 |
gr.ChatInterface(
|
| 120 |
fn=gemini_chat,
|
| 121 |
chatbot=gr.Chatbot(show_label=False,
|
| 122 |
-
avatar_images=(
|
| 123 |
show_share_button=False,
|
| 124 |
show_copy_button=True,
|
| 125 |
likeable=True,
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import os
|
| 4 |
from huggingface_hub import InferenceClient
|
| 5 |
+
import random
|
| 6 |
|
| 7 |
client = InferenceClient("Satyam-Singh/LLaVa-Large-Language-Virtual-Assistant")
|
| 8 |
|
|
|
|
| 108 |
return response.text
|
| 109 |
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
gr.ChatInterface(
|
| 112 |
fn=gemini_chat,
|
| 113 |
chatbot=gr.Chatbot(show_label=False,
|
| 114 |
+
avatar_images=(random.choice(['1.png','2,png','3.png','4.png','5.png']), 'llava-logo.svg'),
|
| 115 |
show_share_button=False,
|
| 116 |
show_copy_button=True,
|
| 117 |
likeable=True,
|