Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,22 +32,14 @@ def summarize_conversation(history: list):
|
|
| 32 |
history_text = "\n".join([f"{entry['sender']}: {entry['message']}" for entry in history])
|
| 33 |
|
| 34 |
# Create a client instance
|
| 35 |
-
client = Client("
|
| 36 |
-
|
| 37 |
-
# Predict the summary using the new parameters
|
| 38 |
result = client.predict(
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
penalty=1.2,
|
| 46 |
-
api_name="/chat"
|
| 47 |
-
)
|
| 48 |
-
|
| 49 |
-
# Decode the result
|
| 50 |
-
generated_text = result
|
| 51 |
return result
|
| 52 |
|
| 53 |
|
|
|
|
| 32 |
history_text = "\n".join([f"{entry['sender']}: {entry['message']}" for entry in history])
|
| 33 |
|
| 34 |
# Create a client instance
|
| 35 |
+
client = Client("Qwen/Qwen2.5-72B-Instruct")
|
|
|
|
|
|
|
| 36 |
result = client.predict(
|
| 37 |
+
query=history_text,
|
| 38 |
+
history=[],
|
| 39 |
+
system="you are a sumarization model your goal is to find the user interest based on conversation",
|
| 40 |
+
api_name="/model_chat"
|
| 41 |
+
)
|
| 42 |
+
print(result)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
return result
|
| 44 |
|
| 45 |
|