Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,9 @@ import gradio as gr
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import requests
|
| 4 |
|
| 5 |
-
# Use
|
| 6 |
-
standard_model = pipeline("
|
| 7 |
-
premium_model = pipeline("
|
| 8 |
|
| 9 |
# Your Boosty API key or any method of checking subscriptions
|
| 10 |
BOOSTY_API_KEY = "YOUR_BOOSTY_API_KEY"
|
|
@@ -30,7 +30,7 @@ def chat_with_ai(user_input, boosty_user_id):
|
|
| 30 |
|
| 31 |
# Get AI response
|
| 32 |
conversation = model_to_use(user_input)
|
| 33 |
-
return conversation[
|
| 34 |
|
| 35 |
# Create the Gradio interface
|
| 36 |
iface = gr.Interface(
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import requests
|
| 4 |
|
| 5 |
+
# Use the text-generation task
|
| 6 |
+
standard_model = pipeline("text-generation", model="google/mt5-base")
|
| 7 |
+
premium_model = pipeline("text-generation", model="google/mt5-base")
|
| 8 |
|
| 9 |
# Your Boosty API key or any method of checking subscriptions
|
| 10 |
BOOSTY_API_KEY = "YOUR_BOOSTY_API_KEY"
|
|
|
|
| 30 |
|
| 31 |
# Get AI response
|
| 32 |
conversation = model_to_use(user_input)
|
| 33 |
+
return conversation[0]["generated_text"]
|
| 34 |
|
| 35 |
# Create the Gradio interface
|
| 36 |
iface = gr.Interface(
|