Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,10 +22,13 @@ if HF_TOKEN:
|
|
| 22 |
else:
|
| 23 |
print("UYARI: HF_TOKEN / HUGGINGFACE_HUB_TOKEN bulunamadı, gated modellere erişilemeyebilir.")
|
| 24 |
|
| 25 |
-
client = InferenceClient(
|
| 26 |
-
model="abacusai/Dracarys-72B-Instruct",
|
| 27 |
-
token=HF_TOKEN if HF_TOKEN else None,
|
| 28 |
-
)
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
# ==========================================
|
|
@@ -537,6 +540,7 @@ def create_comparison_map(gdf1, gdf2):
|
|
| 537 |
def respond(
|
| 538 |
message,
|
| 539 |
history,
|
|
|
|
| 540 |
system_message,
|
| 541 |
max_tokens,
|
| 542 |
temperature,
|
|
@@ -586,7 +590,7 @@ def respond(
|
|
| 586 |
# ==========================================
|
| 587 |
with gr.Blocks() as demo:
|
| 588 |
gr.Markdown("## Mahalle Karşılaştırmalı Chat Botu")
|
| 589 |
-
|
| 590 |
compare_state = gr.State("")
|
| 591 |
|
| 592 |
with gr.Row():
|
|
@@ -600,6 +604,11 @@ with gr.Blocks() as demo:
|
|
| 600 |
title="Basit Chat Botu",
|
| 601 |
description="Küçük bir sohbet botu, HF Inference API ve OSM verisi ile çalışıyor.",
|
| 602 |
additional_inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 603 |
gr.Textbox(
|
| 604 |
value="Sen şehir planlama ve mahalleler hakkında bilgi veren yardımsever bir asistansın.",
|
| 605 |
label="System message",
|
|
|
|
| 22 |
else:
|
| 23 |
print("UYARI: HF_TOKEN / HUGGINGFACE_HUB_TOKEN bulunamadı, gated modellere erişilemeyebilir.")
|
| 24 |
|
| 25 |
+
#client = InferenceClient(
|
| 26 |
+
# model="abacusai/Dracarys-72B-Instruct",
|
| 27 |
+
# token=HF_TOKEN if HF_TOKEN else None,
|
| 28 |
+
#)
|
| 29 |
+
|
| 30 |
+
client = InferenceClient(model=model_name, token=HF_TOKEN if HF_TOKEN else None)
|
| 31 |
+
|
| 32 |
|
| 33 |
|
| 34 |
# ==========================================
|
|
|
|
| 540 |
def respond(
|
| 541 |
message,
|
| 542 |
history,
|
| 543 |
+
model_name,
|
| 544 |
system_message,
|
| 545 |
max_tokens,
|
| 546 |
temperature,
|
|
|
|
| 590 |
# ==========================================
|
| 591 |
with gr.Blocks() as demo:
|
| 592 |
gr.Markdown("## Mahalle Karşılaştırmalı Chat Botu")
|
| 593 |
+
|
| 594 |
compare_state = gr.State("")
|
| 595 |
|
| 596 |
with gr.Row():
|
|
|
|
| 604 |
title="Basit Chat Botu",
|
| 605 |
description="Küçük bir sohbet botu, HF Inference API ve OSM verisi ile çalışıyor.",
|
| 606 |
additional_inputs=[
|
| 607 |
+
gr.Dropdown(
|
| 608 |
+
choices=["abacusai/Dracarys-72B-Instruct", "meta-llama/Llama-2-7b-chat-hf", "tiiuae/falcon-7b-instruct"],
|
| 609 |
+
label="Model Seç",
|
| 610 |
+
value="abacusai/Dracarys-72B-Instruct"
|
| 611 |
+
),
|
| 612 |
gr.Textbox(
|
| 613 |
value="Sen şehir planlama ve mahalleler hakkında bilgi veren yardımsever bir asistansın.",
|
| 614 |
label="System message",
|