Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ from huggingface_hub import InferenceClient
|
|
17 |
# Bhashini API translation function
|
18 |
api_key = getenv('API_KEY')
|
19 |
user_id = getenv('USER_ID')
|
20 |
-
|
21 |
def bhashini_translate(text: str, from_code: str = "en", to_code: str = "hi") -> dict:
|
22 |
"""Translates text from source language to target language using the Bhashini API."""
|
23 |
|
@@ -222,7 +222,7 @@ def translate_text(selected_language,history):
|
|
222 |
|
223 |
# Gradio interface
|
224 |
with gr.Blocks(theme='NoCrypt/miku') as CHATBOT:
|
225 |
-
history_state = gr.State(
|
226 |
with gr.Row():
|
227 |
with gr.Column(scale=10):
|
228 |
gr.HTML(value="""<div style="color: #FF4500;"><h1>ADWITIYA-</h1> <h1><span style="color: #008000">Custom Manual Chatbot and Quizbot</span></h1></div>""")
|
|
|
17 |
# Bhashini API translation function
|
18 |
api_key = getenv('API_KEY')
|
19 |
user_id = getenv('USER_ID')
|
20 |
+
|
21 |
def bhashini_translate(text: str, from_code: str = "en", to_code: str = "hi") -> dict:
|
22 |
"""Translates text from source language to target language using the Bhashini API."""
|
23 |
|
|
|
222 |
|
223 |
# Gradio interface
|
224 |
with gr.Blocks(theme='NoCrypt/miku') as CHATBOT:
|
225 |
+
history_state = gr.State([])
|
226 |
with gr.Row():
|
227 |
with gr.Column(scale=10):
|
228 |
gr.HTML(value="""<div style="color: #FF4500;"><h1>ADWITIYA-</h1> <h1><span style="color: #008000">Custom Manual Chatbot and Quizbot</span></h1></div>""")
|