Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
-
from huggingface_hub
|
3 |
import asyncio
|
4 |
|
5 |
# Define the model ID
|
6 |
model_id = 'Aksh1t/mistral-7b-oig-unsloth-merged'
|
7 |
|
8 |
-
# Initialize the Hugging Face client
|
9 |
-
client =
|
10 |
|
11 |
async def generate_text(prompt):
|
12 |
# Use the Hugging Face client to generate text asynchronously
|
|
|
1 |
import gradio as gr
|
2 |
+
from huggingface_hub import InferenceClient
|
3 |
import asyncio
|
4 |
|
5 |
# Define the model ID
|
6 |
model_id = 'Aksh1t/mistral-7b-oig-unsloth-merged'
|
7 |
|
8 |
+
# Initialize the Hugging Face inference client
|
9 |
+
client = InferenceClient()
|
10 |
|
11 |
async def generate_text(prompt):
|
12 |
# Use the Hugging Face client to generate text asynchronously
|