Update app.py
Browse files
app.py
CHANGED
|
@@ -4,10 +4,14 @@ from huggingface_hub import InferenceClient
|
|
| 4 |
import langdetect
|
| 5 |
import requests
|
| 6 |
import random
|
|
|
|
|
|
|
| 7 |
|
| 8 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY", "")
|
| 9 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 10 |
|
|
|
|
|
|
|
| 11 |
def detect_language(text):
|
| 12 |
"""Detects whether the input text is in French or English."""
|
| 13 |
lang = langdetect.detect(text)
|
|
|
|
| 4 |
import langdetect
|
| 5 |
import requests
|
| 6 |
import random
|
| 7 |
+
from groq import Groq
|
| 8 |
+
|
| 9 |
|
| 10 |
GROQ_API_KEY = os.getenv("GROQ_API_KEY", "")
|
| 11 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 12 |
|
| 13 |
+
model="llama-3.3-70b-versatile"
|
| 14 |
+
|
| 15 |
def detect_language(text):
|
| 16 |
"""Detects whether the input text is in French or English."""
|
| 17 |
lang = langdetect.detect(text)
|