Spaces:
Runtime error
Runtime error
Commit
·
58b0d80
1
Parent(s):
a5f3dc0
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,8 +97,8 @@ def ccogsphere(name: str, rate: str, celsci: str):
|
|
| 97 |
"Name" : ["Video 1", "Video 2", "Video 3", "Video 4", "Video 5"],
|
| 98 |
"Views" : [500, 2000, 540, 300, 200],
|
| 99 |
"Duration" : [30, 20, 70, 35, 22]})
|
| 100 |
-
name1=name.split(
|
| 101 |
-
mess=name1[1] #temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0
|
| 102 |
try:
|
| 103 |
client = Client("https://osaaso-mistral-7b-instruct.hf.space/")
|
| 104 |
result = client.predict(
|
|
@@ -110,7 +110,7 @@ def ccogsphere(name: str, rate: str, celsci: str):
|
|
| 110 |
api_name="/chat"
|
| 111 |
)
|
| 112 |
nam=result.json() #name1[0]
|
| 113 |
-
if name
|
| 114 |
mess="No messages..."
|
| 115 |
except:
|
| 116 |
nam="No name, write your name followed by a message"
|
|
|
|
| 97 |
"Name" : ["Video 1", "Video 2", "Video 3", "Video 4", "Video 5"],
|
| 98 |
"Views" : [500, 2000, 540, 300, 200],
|
| 99 |
"Duration" : [30, 20, 70, 35, 22]})
|
| 100 |
+
name1=name.split()
|
| 101 |
+
mess=name #name1[1] #temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0
|
| 102 |
try:
|
| 103 |
client = Client("https://osaaso-mistral-7b-instruct.hf.space/")
|
| 104 |
result = client.predict(
|
|
|
|
| 110 |
api_name="/chat"
|
| 111 |
)
|
| 112 |
nam=result.json() #name1[0]
|
| 113 |
+
if name==None:
|
| 114 |
mess="No messages..."
|
| 115 |
except:
|
| 116 |
nam="No name, write your name followed by a message"
|